diff options
author | Sean Finney <seanius@debian.org> | 2011-03-18 19:54:45 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-03-18 19:54:45 +0100 |
commit | ddf5ea3883723f9a64845511583b6dad8ff3600d (patch) | |
tree | 61a11f8059ae7210c7ae6f9be81dac7851728c97 /gbp | |
parent | e79dfe5563c13f5765c2cb352319ff8183a1a745 (diff) |
gbp: Allow to pass cwd to git.__get_output()
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/git.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -39,14 +39,14 @@ class GitRepository(object): env.update(extra_env) return env - def __git_getoutput(self, command, args=[], extra_env=None): + def __git_getoutput(self, command, args=[], extra_env=None, cwd=None): """exec a git command and return the output""" output = [] env = self.__build_env(extra_env) cmd = ['git', command] + args log.debug(cmd) - popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=env) + popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=env, cwd=cwd) while popen.poll() == None: output += popen.stdout.readlines() ret = popen.poll() |