aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/util
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2012-02-16 16:15:24 -0500
committerW. Trevor King <wking@drexel.edu>2012-02-16 16:43:50 -0500
commit21286ccdbbf4c8853545392df087244fc8510293 (patch)
tree60b5e9601055cc28307752707d17dc6a672256f6 /libbe/util
parent0d3d9a3780a27f1c80833638ad0622bf4e67023d (diff)
downloadbugseverywhere-21286ccdbbf4c8853545392df087244fc8510293.tar.gz
Add update-copyright as a submodule and update release.py accordingly.
Also add `**kwargs` to `invoke` so we can specify the environment.
Diffstat (limited to 'libbe/util')
-rw-r--r--libbe/util/subproc.py6
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)