mirror of
https://github.com/FliegendeWurst/googleplay-api.git
synced 2024-11-22 04:44:59 +00:00
Restore security error message
This commit is contained in:
parent
588b17eb7c
commit
86e069b541
@ -54,7 +54,11 @@ class RequestError(Exception):
|
|||||||
return repr(self.value)
|
return repr(self.value)
|
||||||
|
|
||||||
class SecurityCheckError(Exception):
|
class SecurityCheckError(Exception):
|
||||||
pass
|
def __init__(self, value):
|
||||||
|
self.value = value
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return repr(self.value)
|
||||||
|
|
||||||
|
|
||||||
class GooglePlayAPI(object):
|
class GooglePlayAPI(object):
|
||||||
@ -220,7 +224,9 @@ class GooglePlayAPI(object):
|
|||||||
ac2dmToken = params["auth"]
|
ac2dmToken = params["auth"]
|
||||||
elif "error" in params:
|
elif "error" in params:
|
||||||
if "NeedsBrowser" in params["error"]:
|
if "NeedsBrowser" in params["error"]:
|
||||||
raise SecurityCheckError()
|
raise SecurityCheckError("Security check is needed, try to visit "
|
||||||
|
"https://accounts.google.com/b/0/DisplayUnlockCaptcha "
|
||||||
|
"to unlock, or setup an app-specific passwor")
|
||||||
raise LoginError("server says: " + params["error"])
|
raise LoginError("server says: " + params["error"])
|
||||||
else:
|
else:
|
||||||
raise LoginError("Auth token not found.")
|
raise LoginError("Auth token not found.")
|
||||||
|
Loading…
Reference in New Issue
Block a user