From 6d85ae0992da969d973068cb88563a0567c51a6b Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Thu, 11 Feb 2016 08:21:22 -0800 Subject: [PATCH] Allowing pyOpenSSL import to fail for GAE. Fixes #1445. --- gcloud/credentials.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcloud/credentials.py b/gcloud/credentials.py index 9874042ba47aa..f6a5571156b89 100644 --- a/gcloud/credentials.py +++ b/gcloud/credentials.py @@ -19,7 +19,12 @@ import six from six.moves.urllib.parse import urlencode # pylint: disable=F0401 -from OpenSSL import crypto +try: + from OpenSSL import crypto +except ImportError: + # pyOpenSSL can't be installed on App Engine, but it will not + # be needed there since app_identity is used. + crypto = None from oauth2client import client from oauth2client.client import _get_application_default_credential_from_file