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,
|
||||
data=data
|
||||
)
|
||||
except PyiCloudAPIResponseError, error:
|
||||
except PyiCloudAPIResponseError as error:
|
||||
if error.code == -21669:
|
||||
# Wrong verification code
|
||||
return False
|
||||
|
|
|
@ -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 "
|
||||
|
|
Loading…
Reference in a new issue