aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bzr.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2006-07-19 10:14:03 -0400
committerAaron Bentley <abentley@panoramicfeedback.com>2006-07-19 10:14:03 -0400
commit16acc74181767343289c729f668fb34d50212441 (patch)
treeba8708dd988804a2b622f6453c93f22139e15870 /libbe/bzr.py
parent906ef74e2e941794df5297b5622be58d8c352e50 (diff)
downloadbugseverywhere-16acc74181767343289c729f668fb34d50212441.tar.gz
Use subprocess-native functionality for changing directory
Diffstat (limited to 'libbe/bzr.py')
-rw-r--r--libbe/bzr.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/libbe/bzr.py b/libbe/bzr.py
index b53429c..ddda334 100644
--- a/libbe/bzr.py
+++ b/libbe/bzr.py
@@ -25,14 +25,7 @@ def invoke_client(*args, **kwargs):
expect = kwargs.get('expect', (0, 1))
cl_args = ["bzr"]
cl_args.extend(args)
- if directory:
- old_dir = os.getcwd()
- os.chdir(directory)
- try:
- status,output,error = invoke(cl_args, expect)
- finally:
- if directory:
- os.chdir(old_dir)
+ status,output,error = invoke(cl_args, expect, cwd=directory)
return status, output
def add_id(filename, paranoid=False):