Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pep8 + print statement alignment #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions samples/calendar_api/calendar_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,27 @@
from oauth2client import client
from googleapiclient import sample_tools


def main(argv):
# Authenticate and construct service.
service, flags = sample_tools.init(
argv, 'calendar', 'v3', __doc__, __file__,
scope='https://www.googleapis.com/auth/calendar.readonly')

try:
page_token = None
while True:
calendar_list = service.calendarList().list(pageToken=page_token).execute()
for calendar_list_entry in calendar_list['items']:
print calendar_list_entry['summary']
page_token = calendar_list.get('nextPageToken')
if not page_token:
break

except client.AccessTokenRefreshError:
print ('The credentials have been revoked or expired, please re-run'
'the application to re-authorize.')
# Authenticate and construct service.
service, flags = sample_tools.init(
argv, 'calendar', 'v3', __doc__, __file__,
scope='https://www.googleapis.com/auth/calendar.readonly')

try:
page_token = None
while True:
calendar_list = service.calendarList().list(
pageToken=page_token).execute()
for calendar_list_entry in calendar_list['items']:
print(calendar_list_entry['summary'])
page_token = calendar_list.get('nextPageToken')
if not page_token:
break

except client.AccessTokenRefreshError:
print('The credentials have been revoked or expired, please re-run'
'the application to re-authorize.')

if __name__ == '__main__':
main(sys.argv)
main(sys.argv)