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:
Steve Kowalik
2019-08-28 15:24:54 +10:00
committed by GitHub
parent 7bac694ae5
commit a0f01cf9cf
9 changed files with 44 additions and 94 deletions
+3 -1
View File
@@ -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):