mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Remove more Python version specific code (#1193)
Remove a bunch of other call sites that behaved differently between Python 2 and 3, massively cleaning up a few messy methods.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
import json
|
||||
|
||||
|
||||
class GithubException(Exception):
|
||||
"""
|
||||
@@ -59,7 +61,7 @@ class GithubException(Exception):
|
||||
return self.__data
|
||||
|
||||
def __str__(self):
|
||||
return str(self.status) + " " + str(self.data)
|
||||
return "{status} {data}".format(status=self.status, data=json.dumps(self.data))
|
||||
|
||||
|
||||
class BadCredentialsException(GithubException):
|
||||
|
||||
Reference in New Issue
Block a user