Use Python 3 exception handling syntax (PEP 3110)
This commit is contained in:
parent
49eebc5cdc
commit
85598c9a6b
2 changed files with 2 additions and 2 deletions
|
@ -242,7 +242,7 @@ class PyiCloudService(object):
|
||||||
params=self.params,
|
params=self.params,
|
||||||
data=data
|
data=data
|
||||||
)
|
)
|
||||||
except PyiCloudAPIResponseError, error:
|
except PyiCloudAPIResponseError as error:
|
||||||
if error.code == -21669:
|
if error.code == -21669:
|
||||||
# Wrong verification code
|
# Wrong verification code
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -34,7 +34,7 @@ class PhotosService(object):
|
||||||
'syncToken': response['syncToken'],
|
'syncToken': response['syncToken'],
|
||||||
'clientInstanceId': self.params.pop('clientId')
|
'clientInstanceId': self.params.pop('clientId')
|
||||||
})
|
})
|
||||||
except PyiCloudAPIResponseError, error:
|
except PyiCloudAPIResponseError as error:
|
||||||
if error.code == 402:
|
if error.code == 402:
|
||||||
raise PyiCloudPhotoLibraryNotActivatedErrror(
|
raise PyiCloudPhotoLibraryNotActivatedErrror(
|
||||||
"iCloud Photo Library has not been activated yet "
|
"iCloud Photo Library has not been activated yet "
|
||||||
|
|
Loading…
Reference in a new issue