Skip to content

Commit

Permalink
Merge pull request googleapis#3 from google/master
Browse files Browse the repository at this point in the history
Backward compatibility update (Google/oauth2client)
  • Loading branch information
aaronwinter committed Jan 28, 2015
2 parents ac61423 + d0cb821 commit 7d3743d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion oauth2client/old_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import webbrowser

import gflags
from six.moves import input

from oauth2client import client
from oauth2client import util
Expand Down Expand Up @@ -147,7 +148,7 @@ def run(flow, storage, http=None):
print('Failed to find "code" in the query parameters of the redirect.')
sys.exit('Try running with --noauth_local_webserver.')
else:
code = raw_input('Enter verification code: ').strip()
code = input('Enter verification code: ').strip()

try:
credential = flow.step2_exchange(code, http=http)
Expand Down
3 changes: 2 additions & 1 deletion oauth2client/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

from six.moves import BaseHTTPServer
from six.moves import urllib
from six.moves import input

from oauth2client import client
from oauth2client import util
Expand Down Expand Up @@ -216,7 +217,7 @@ def run_flow(flow, storage, flags, http=None):
print('Failed to find "code" in the query parameters of the redirect.')
sys.exit('Try running with --noauth_local_webserver.')
else:
code = raw_input('Enter verification code: ').strip()
code = input('Enter verification code: ').strip()

try:
credential = flow.step2_exchange(code, http=http)
Expand Down
3 changes: 2 additions & 1 deletion samples/oauth2_for_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# See: https://developers.google.com/accounts/docs/OAuth2ForDevices

import httplib2
from six.moves import input
from oauth2client.client import OAuth2WebServerFlow
from googleapiclient.discovery import build

Expand All @@ -18,7 +19,7 @@
print "Enter the following code at %s: %s" % (flow_info.verification_url,
flow_info.user_code)
print "Then press Enter."
raw_input()
input()

# Step 2: get credentials
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingatoken
Expand Down

0 comments on commit 7d3743d

Please sign in to comment.