Add SUGGEST_OAUTH2 attribute
This was introduced in the 1.7.1 SDK.
@@ -107,6 +107,9 @@ class ClientLoginError(urllib2.HTTPError):
class AbstractRpcServer(object):
"""Provides a common interface for a simple RPC server."""
+
+ SUGGEST_OAUTH2 = False
+
def __init__(self, host, auth_function, user_agent, source,
host_override=None, extra_headers=None, save_cookies=False,
auth_tries=3, account_type=None, debug_data=True, secure=True,
@@ -335,6 +338,14 @@ class AbstractRpcServer(object):
"of your regular account password.")
print >>sys.stderr, ("See http://www.google.com/"
"support/accounts/bin/answer.py?answer=185833")
+
+
+
+ if self.SUGGEST_OAUTH2:
+ print >>sys.stderr, ("However, now the recommended way to log in "
+ "is using OAuth2. See")
+ print >>sys.stderr, ("https://developers.google.com/appengine/"
+ "docs/python/tools/uploadinganapp#oauth")
else:
print >>sys.stderr, "Invalid username or password."
continue
