Changed generic Except. in ...GooglePlayAPI to LoginError

This commit is contained in:
Sebastian Weisgerber 2019-01-23 08:58:59 +01:00
parent c119d1ce5b
commit 5f42319971

View File

@ -311,7 +311,7 @@ class GooglePlayAPI(object):
def executeRequestApi2(self, path, post_data=None, content_type=CONTENT_TYPE_URLENC, params=None):
if self.authSubToken is None:
raise Exception("You need to login before executing any request")
raise LoginError("You need to login before executing any request")
headers = self.getHeaders()
headers["Content-Type"] = content_type
@ -354,7 +354,7 @@ class GooglePlayAPI(object):
offset (int): is used to take result starting from an index.
"""
if self.authSubToken is None:
raise Exception("You need to login before executing any request")
raise LoginError("You need to login before executing any request")
path = SEARCH_URL + "?c=3&q={}".format(requests.utils.quote(query))
# FIXME: not sure if this toc call should be here
@ -593,7 +593,7 @@ class GooglePlayAPI(object):
"""
if self.authSubToken is None:
raise Exception("You need to login before executing any request")
raise LoginError("You need to login before executing any request")
if versionCode is None:
# pick up latest version