Fixed a missed 2fa-2sa transition

This commit is contained in:
dillanmills 2017-09-25 08:11:24 -07:00 committed by Tor Arne Vestbø
parent 4daf035689
commit 3899363167

View file

@ -102,7 +102,7 @@ class PyiCloudSession(requests.Session):
return response
def _raise_error(self, code, reason):
if self.service.requires_2fa and \
if self.service.requires_2sa and \
reason == 'Missing X-APPLE-WEBAUTH-TOKEN cookie':
raise PyiCloud2SARequiredError(response.url)
if code == 'ZONE_NOT_FOUND' or code == 'AUTHENTICATION_FAILED':