From 6a4c21fc577536e440abd03da0103dd9df2be5e7 Mon Sep 17 00:00:00 2001 From: Jaisen Mathai Date: Wed, 24 Jul 2019 00:50:02 -0700 Subject: [PATCH] Fix an exception that is raised when creating a media item in Google Photos fails #328 (#329) Fixes #328 When creating a new media item for Google Photos fails it does not return newMediaItemResults in the body. The code checks for this but then returns the key which it verified does not exist. This change returns the entire response body in its entirety. --- elodie/plugins/googlephotos/googlephotos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elodie/plugins/googlephotos/googlephotos.py b/elodie/plugins/googlephotos/googlephotos.py index c6b2172..6be012d 100644 --- a/elodie/plugins/googlephotos/googlephotos.py +++ b/elodie/plugins/googlephotos/googlephotos.py @@ -149,7 +149,7 @@ class GooglePhotos(PluginBase): ) ): - self.log('Creating new media item failed: {}'.format(resp['newMediaItemResults'][0]['status'])) + self.log('Creating new media item failed: {}'.format(json.dumps(resp))) return None return resp['newMediaItemResults'][0]