From 85598c9a6b1474458ac956c3e901c70a15f0c126 Mon Sep 17 00:00:00 2001 From: Bart274 Date: Sun, 13 Mar 2016 15:07:25 +0100 Subject: [PATCH] Use Python 3 exception handling syntax (PEP 3110) --- pyicloud/base.py | 2 +- pyicloud/services/photos.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 "