Add NotModifiedException class

This commit is contained in:
AKFish
2013-08-21 23:04:07 +08:00
parent bd7abb5877
commit 1e9ec2df08
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -5,6 +5,7 @@
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2013 AKFish <akfish@gmail.com> #
# #
# This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ #
# #
@@ -76,3 +77,8 @@ class RateLimitExceededException(GithubException):
"""
Exception raised when the rate limit is exceeded (when Github API replies with a 403 rate limit exceeded HTML status)
"""
class NotModifiedException(GithubException):
"""
Exception raised when conditional request is made to a resoure that has not changed
"""
+1 -1
View File
@@ -157,7 +157,7 @@ class GithubObject(object):
self._storeAndUseAttributes(data)
self.__completed = True
return True
except: #GithubException.NotModifiedException:
except GithubException.NotModifiedException:
return False
class NonCompletableGithubObject(GithubObject):