diff options
Diffstat (limited to 'libbe/util')
-rw-r--r-- | libbe/util/subproc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbe/util/subproc.py b/libbe/util/subproc.py index 2c45f0c..3a66f49 100644 --- a/libbe/util/subproc.py +++ b/libbe/util/subproc.py @@ -48,7 +48,7 @@ class CommandError(Exception): def invoke(args, stdin=None, stdout=PIPE, stderr=PIPE, expect=(0,), cwd=None, shell=None, unicode_output=True, verbose=False, - encoding=None): + encoding=None, **kwargs): """ expect should be a tuple of allowed exit codes. cwd should be the directory from which the command will be executed. When @@ -70,14 +70,14 @@ def invoke(args, stdin=None, stdout=PIPE, stderr=PIPE, expect=(0,), if shell is None: shell = False q = Popen(args, stdin=PIPE, stdout=stdout, stderr=stderr, - shell=shell, cwd=cwd) + shell=shell, cwd=cwd, **kwargs) else: assert _MSWINDOWS==True, 'invalid platform' if shell is None: shell = True # win32 don't have os.execvp() so have to run command in a shell q = Popen(args, stdin=PIPE, stdout=stdout, stderr=stderr, - shell=shell, cwd=cwd) + shell=shell, cwd=cwd, **kwargs) except OSError, e: raise CommandError(list_args, status=e.args[0], stderr=e) stdout,stderr = q.communicate(input=stdin) |