Skip to content

Commit

Permalink
googleplus: fix positional argument warning from google-api-client
Browse files Browse the repository at this point in the history
specifically:

execute() takes at most 1 positional argument (2 given) (/base/data/home/apps/s~brid-gy/7.402950590977246624/local/lib/python2.7/site-packages/oauth2client/_helpers.py:132)

from googleapiclient.http.HttpRequest.execute()
  • Loading branch information
snarfed committed Aug 14, 2017
1 parent 8fd3071 commit e949f81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions granary/googleplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ def request_with_etag(*args, **kwargs):
try:
if activity_id:
call = self.auth_entity.api().activities().get(activityId=activity_id)
activities = [call.execute(http)]
activities = [call.execute(http=http)]
elif search_query:
call = self.auth_entity.api().activities().search(
query=search_query, maxResults=min(count, SEARCH_MAX_RESULTS))
activities = call.execute(http).get('items', [])
activities = call.execute(http=http).get('items', [])
else:
call = self.auth_entity.api().activities().list(
userId=user_id, collection='public', maxResults=count)
resp = call.execute(http)
resp = call.execute(http=http)
activities = resp.get('items', [])
etag = resp.get('etag')
except HttpError, e:
Expand Down Expand Up @@ -180,7 +180,7 @@ def set_comments(req_id, resp, exc, activity=None):
'resharers', 'share')

if batch._requests:
batch.execute(http)
batch.execute(http=http)

for a in activities:
self.postprocess_activity(a)
Expand All @@ -203,7 +203,7 @@ def get_comment(self, comment_id, activity_id=None, activity_author_id=None,
"""
# https://developers.google.com/+/api/latest/comments
call = self.auth_entity.api().comments().get(commentId=comment_id)
cmt = call.execute(self.auth_entity.http())
cmt = call.execute(http=self.auth_entity.http())
return self.postprocess_comment(cmt)

def postprocess_activity(self, activity):
Expand Down

0 comments on commit e949f81

Please sign in to comment.