Raise a specific exception for bad credentials (issue #152)

This commit is contained in:
Vincent Jacques
2013-03-29 13:01:06 +01:00
parent f5d8e221d1
commit 7b3e4c15ed
5 changed files with 34 additions and 2 deletions
+6
View File
@@ -40,3 +40,9 @@ class GithubException(Exception):
def __str__(self):
return str(self.status) + " " + str(self.data)
class BadCredentialsException(GithubException):
"""
Exception raised in case of bad credentials (when Github API replies with a 401 or 403 HTML status)
"""