summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-01 18:52:10 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-02 13:14:50 +0200
commit74be4a2abfb0be83bacce04dcc531968dc31c4b9 (patch)
tree784edd3982b0fab482d62c27ffbb267dd19b93e5 /script
parent6f6bfb3f2039ce6ba3bd4c1ee1440becc2c6e104 (diff)
downloadsamba-74be4a2abfb0be83bacce04dcc531968dc31c4b9.tar.gz
samba-74be4a2abfb0be83bacce04dcc531968dc31c4b9.tar.bz2
samba-74be4a2abfb0be83bacce04dcc531968dc31c4b9.zip
land: Avoid more uses of chdir().
Diffstat (limited to 'script')
-rwxr-xr-xscript/land.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/script/land.py b/script/land.py
index 20ac8260c4..78160af8ba 100755
--- a/script/land.py
+++ b/script/land.py
@@ -128,11 +128,8 @@ class builder(object):
if self.output_mime_type == "text/x-subunit":
self.cmd += " | %s --immediate" % (os.path.join(os.path.dirname(__file__), "selftest/format-subunit"))
print '%s: [%s] Running %s' % (self.name, self.stage, self.cmd)
- cwd = os.getcwd()
- os.chdir("%s/%s" % (self.sdir, self.dir))
- self.proc = Popen(self.cmd, shell=True,
+ self.proc = Popen(self.cmd, shell=True, cwd="%s/%s" % (self.sdir, self.dir),
stdout=self.stdout, stderr=self.stderr, stdin=self.stdin)
- os.chdir(cwd)
self.next += 1
@@ -224,11 +221,8 @@ class buildlist(object):
os.unlink(b.stderr_path)
def start_tail(self):
- cwd = os.getcwd()
cmd = "tail -f *.stdout *.stderr"
- os.chdir(gitroot)
- self.tail_proc = Popen(cmd, shell=True)
- os.chdir(cwd)
+ self.tail_proc = Popen(cmd, shell=True, cwd=gitroot)
def cleanup():