mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Add NotModifiedException class
This commit is contained in:
@@ -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
|
||||
"""
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user