Skip to content

Commit 6d85ae0

Browse files
committed
Allowing pyOpenSSL import to fail for GAE.
Fixes #1445.
1 parent 0910f99 commit 6d85ae0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gcloud/credentials.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
import six
2020
from six.moves.urllib.parse import urlencode # pylint: disable=F0401
2121

22-
from OpenSSL import crypto
22+
try:
23+
from OpenSSL import crypto
24+
except ImportError:
25+
# pyOpenSSL can't be installed on App Engine, but it will not
26+
# be needed there since app_identity is used.
27+
crypto = None
2328

2429
from oauth2client import client
2530
from oauth2client.client import _get_application_default_credential_from_file

0 commit comments

Comments
 (0)