aboutsummaryrefslogtreecommitdiffstats
path: root/github3/errors.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2011-11-12 02:55:52 +0100
committerDavid Medina <davidmedina9@gmail.com>2011-11-12 03:14:35 +0100
commit2ed172774e179dbf7020e1898cb1bcc4e485e9e9 (patch)
tree2970a4ed163dc3d311a8c022e00a7264ae272ace /github3/errors.py
parentUpdated readme (diff)
downloadpython-github3-2ed172774e179dbf7020e1898cb1bcc4e485e9e9.tar.xz
python-github3-2ed172774e179dbf7020e1898cb1bcc4e485e9e9.zip
Added core_test and fix some bugs / pep8
Readme to Markdown
Diffstat (limited to 'github3/errors.py')
-rw-r--r--github3/errors.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/github3/errors.py b/github3/errors.py
index 09e616b..bd85483 100644
--- a/github3/errors.py
+++ b/github3/errors.py
@@ -6,6 +6,7 @@
import json
import github3.exceptions as exceptions
+
class GithubError(object):
""" Handler for API errors """
@@ -14,7 +15,7 @@ class GithubError(object):
self.status_code = response.status_code
try:
self.debug = self._parser.loads(response.content)
- except ValueError:
+ except (ValueError, TypeError):
self.debug = {'message': response.content}
def error_400(self):