aboutsummaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorRoman Lacko <backup.rlacko@gmail.com>2012-09-07 15:39:28 +0200
committerRoman Lacko <backup.rlacko@gmail.com>2012-09-07 15:39:28 +0200
commit9a1ce0d52db45c2f320202ad949f37185a491216 (patch)
tree77ff23450ae5bb20662cdc1b834eb5b4b295848c /utils.py
parente4d591c211be0fb3f8f221462443377a657a8903 (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.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/utils.py b/utils.py
index 81deedd51..c03f31f7c 100644
--- a/utils.py
+++ b/utils.py
@@ -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'):