Use Python 3 exception handling syntax (PEP 3110)

This commit is contained in:
Bart274 2016-03-13 15:07:25 +01:00 committed by Tor Arne Vestbø
parent 49eebc5cdc
commit 85598c9a6b
2 changed files with 2 additions and 2 deletions

View file

@ -242,7 +242,7 @@ class PyiCloudService(object):
params=self.params,
data=data
)
except PyiCloudAPIResponseError, error:
except PyiCloudAPIResponseError as error:
if error.code == -21669:
# Wrong verification code
return False

View file

@ -34,7 +34,7 @@ class PhotosService(object):
'syncToken': response['syncToken'],
'clientInstanceId': self.params.pop('clientId')
})
except PyiCloudAPIResponseError, error:
except PyiCloudAPIResponseError as error:
if error.code == 402:
raise PyiCloudPhotoLibraryNotActivatedErrror(
"iCloud Photo Library has not been activated yet "