Commit 48dbd02e by Dmitry Sadovnychyi

Raise an exception if subprocess is not available

parent 45835e6e
...@@ -97,11 +97,13 @@ except ImportError: ...@@ -97,11 +97,13 @@ except ImportError:
# Override missing methods on environments where it cannot be used like GAE. # Override missing methods on environments where it cannot be used like GAE.
import subprocess import subprocess
if not hasattr(subprocess, 'PIPE'): if not hasattr(subprocess, 'PIPE'):
subprocess.PIPE = lambda *args, **kwargs: print( def _fake_PIPE(*args, **kwargs):
'subprocess.PIPE is not supported.') raise NotImplementedError('subprocess.PIPE is not supported.')
subprocess.PIPE = _fake_PIPE
if not hasattr(subprocess, 'Popen'): if not hasattr(subprocess, 'Popen'):
subprocess.Popen = lambda *args, **kwargs: print( def _fake_Popen(*args, **kwargs):
'subprocess.Popen is not supported.') raise NotImplementedError('subprocess.Popen is not supported.')
subprocess.Popen = _fake_Popen
########################################################### ###########################################################
# TOP-LEVEL MODULES # TOP-LEVEL MODULES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment