subprocess_wrapper.py 438 B

12345678910111213141516171819
  1. from yt.common import to_native_str
  2. try:
  3. import subprocess32 as subprocess
  4. except ImportError:
  5. import subprocess
  6. Popen = subprocess.Popen
  7. PIPE = subprocess.PIPE
  8. STDOUT = subprocess.STDOUT
  9. CalledProcessError = subprocess.CalledProcessError
  10. def check_call(*args, **kwargs):
  11. return subprocess.check_call(*args, **kwargs)
  12. def check_output(*args, **kwargs):
  13. return to_native_str(subprocess.check_output(*args, **kwargs))