fixed authentication issue
This commit is contained in:
parent
7bc48d41ed
commit
d231be1aad
@ -142,7 +142,11 @@ class GarminClient(object):
|
||||
def _validate_auth_ticket(self, validation_url):
|
||||
log.debug("validating authentication ticket ...")
|
||||
response = self.session.get(validation_url, allow_redirects=True)
|
||||
if not response.status_code == 200:
|
||||
if response.status_code == 200 or response.status_code == 404:
|
||||
# for some reason a 404 response code can also denote a
|
||||
# successful auth ticket validation
|
||||
return
|
||||
|
||||
raise Exception(
|
||||
u"failed to validate authentication ticket: {}:\n{}".format(
|
||||
response.status_code, response.text))
|
||||
|
Loading…
Reference in New Issue
Block a user