forked from platypush/platypush
Only initalize credentials map in Google plugins if some scopes are required
This commit is contained in:
parent
710694e8d7
commit
eb40024c53
1 changed files with 7 additions and 4 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue