diff --git a/pyicloud/base.py b/pyicloud/base.py index 318c020..c58de3d 100644 --- a/pyicloud/base.py +++ b/pyicloud/base.py @@ -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 diff --git a/pyicloud/services/photos.py b/pyicloud/services/photos.py index 66bd288..c8eda8f 100644 --- a/pyicloud/services/photos.py +++ b/pyicloud/services/photos.py @@ -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 "