Add an IncompletableObject exception (#1227)

If a returned object from GitHub does not include an URL, that object
can not be completed, and used to fail with an obscure traceback saying
NoneType has no method startswith. Check for this, and raise
IncompletableObject instead.
This commit is contained in:
Steve Kowalik
2019-09-23 16:40:06 +10:00
committed by GitHub
parent 850da5af27
commit f91cbac2e3
3 changed files with 14 additions and 0 deletions
+6
View File
@@ -123,3 +123,9 @@ class TwoFactorException(GithubException):
"""
Exception raised when Github requires a onetime password for two-factor authentication
"""
class IncompletableObject(GithubException):
"""
Exception raised when we can not request an object from Github because the data returned did not include a URL
"""