diff --git a/src/gam.py b/src/gam.py index 4f75dd65..39c798d8 100755 --- a/src/gam.py +++ b/src/gam.py @@ -1778,7 +1778,7 @@ def watchGmail(users): break else: topic = gamTopics+str(uuid.uuid4()) - callGAPI(pubsub.projects().topics(), 'create', name=topic, body={}) + callGAPI(pubsub.projects().topics(), 'create', name=topic) body = {'policy': {'bindings': [{'members': ['serviceAccount:gmail-api-push@system.gserviceaccount.com'], 'role': 'roles/pubsub.editor'}]}} callGAPI(pubsub.projects().topics(), 'setIamPolicy', resource=topic, body=body) subscriptions = callGAPIpages(pubsub.projects().topics().subscriptions(), 'list', items='subscriptions', topic=topic) @@ -7978,7 +7978,7 @@ def doCreateProject(): except (KeyError, IndexError): systemErrorExit(3, 'you have no rights to create projects for your organization and you don\'t seem to be a super admin! Sorry, there\'s nothing more I can do.') org_policy = callGAPI(crm.organizations(), 'getIamPolicy', - resource=organization, body={}) + resource=organization) if 'bindings' not in org_policy: org_policy['bindings'] = [] print('Looks like no one has rights to your Google Cloud Organization. Attempting to give you create rights...') diff --git a/src/requirements.txt b/src/requirements.txt index 1d58fbf7..9bec2e88 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,5 +1,5 @@ python-dateutil -google-api-python-client +google-api-python-client>=1.7.10 google-auth google-auth-httplib2 google-auth-oauthlib==0.4.0