From eb40024c53ee310244f16fc89e41fab6c860ec9b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 18 Mar 2019 01:06:10 +0100 Subject: [PATCH] Only initalize credentials map in Google plugins if some scopes are required --- platypush/plugins/google/__init__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/platypush/plugins/google/__init__.py b/platypush/plugins/google/__init__.py index 110ffad3..d340130b 100644 --- a/platypush/plugins/google/__init__.py +++ b/platypush/plugins/google/__init__.py @@ -44,10 +44,13 @@ class GooglePlugin(Plugin): super().__init__(*args, **kwargs) self._scopes = scopes or [] - scopes = ' '.join(sorted(self._scopes)) - self.credentials = { - scopes: get_credentials(scopes) - } + if self._scopes: + scopes = ' '.join(sorted(self._scopes)) + self.credentials = { + scopes: get_credentials(scopes) + } + else: + self.credentials = {} def get_service(self, service, version, scopes=None):