diff options
author | Roman Lacko <backup.rlacko@gmail.com> | 2012-09-07 15:39:28 +0200 |
---|---|---|
committer | Roman Lacko <backup.rlacko@gmail.com> | 2012-09-07 15:39:28 +0200 |
commit | 9a1ce0d52db45c2f320202ad949f37185a491216 (patch) | |
tree | 77ff23450ae5bb20662cdc1b834eb5b4b295848c /utils.py | |
parent | e4d591c211be0fb3f8f221462443377a657a8903 (diff) |
Don't use custom popenasync module on linux to run commands. This fixes following error: can't concatenate bytes to None
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -5,9 +5,13 @@ import errno import time import shutil import subprocess -import popenasync import fnmatch +from distutils.spawn import spawn +from distutils.spawn import DistutilsExecError + +import popenasync + def has_option(name): try: @@ -162,6 +166,13 @@ def rmtree(dirname): def run_process(args, logger=None): + if sys.platform != "win32": + try: + spawn(args) + return 0 + except DistutilsExecError: + return -1 + def log(buffer, checkNewLine): endsWithNewLine = False if buffer.endswith('\n'): |