diff --git a/docs/gcloud-auth.rst b/docs/gcloud-auth.rst index 42542dfff46c..802c404e2cce 100644 --- a/docs/gcloud-auth.rst +++ b/docs/gcloud-auth.rst @@ -91,23 +91,25 @@ you can pass it directly to a :class:`Client `: Google App Engine Environment ----------------------------- -To create :class:`credentials ` +To create +:class:`credentials ` just for Google App Engine: .. code:: python - from oauth2client.appengine import AppAssertionCredentials + from oauth2client.contrib.appengine import AppAssertionCredentials credentials = AppAssertionCredentials([]) Google Compute Engine Environment --------------------------------- -To create :class:`credentials ` +To create +:class:`credentials ` just for Google Compute Engine: .. code:: python - from oauth2client.gce import AppAssertionCredentials + from oauth2client.contrib.gce import AppAssertionCredentials credentials = AppAssertionCredentials([]) Service Accounts diff --git a/gcloud/credentials.py b/gcloud/credentials.py index 6e92ddbfc7c7..7e995bdc8597 100644 --- a/gcloud/credentials.py +++ b/gcloud/credentials.py @@ -31,7 +31,8 @@ from oauth2client import crypt from oauth2client.service_account import ServiceAccountCredentials try: - from oauth2client.appengine import AppAssertionCredentials as _GAECreds + from oauth2client.contrib.appengine import ( + AppAssertionCredentials as _GAECreds) except ImportError: class _GAECreds(object): """Dummy class if not in App Engine environment."""