Skip to content

Commit 0f34dd0

Browse files
committed
Ignore ImportError with subprocess.check_output for GAE compatibility (issue #231)
1 parent 7f10e74 commit 0f34dd0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/future/backports/misc.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,10 +922,14 @@ def __hash__(self):
922922
# from the standard library:
923923
if sys.version_info >= (2, 7):
924924
from collections import OrderedDict, Counter
925-
from subprocess import check_output
926925
from itertools import count
927-
from socket import create_connection
928926
from functools import cmp_to_key
927+
try:
928+
from subprocess import check_output
929+
except ImportError:
930+
# Not available. This happens with Google App Engine: see issue #231
931+
pass
932+
from socket import create_connection
929933

930934
if sys.version_info >= (3, 0):
931935
from math import ceil

0 commit comments

Comments
 (0)