Only initalize credentials map in Google plugins if some scopes are required

This commit is contained in:
Fabio Manganiello 2019-03-18 01:06:10 +01:00
parent 710694e8d7
commit eb40024c53

View file

@ -44,10 +44,13 @@ class GooglePlugin(Plugin):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self._scopes = scopes or [] self._scopes = scopes or []
if self._scopes:
scopes = ' '.join(sorted(self._scopes)) scopes = ' '.join(sorted(self._scopes))
self.credentials = { self.credentials = {
scopes: get_credentials(scopes) scopes: get_credentials(scopes)
} }
else:
self.credentials = {}
def get_service(self, service, version, scopes=None): def get_service(self, service, version, scopes=None):