summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-09-10 15:08:16 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-09-10 15:08:16 -0400
commite9119a952d721b340584092853490c393172099c (patch)
treed15e16e555fa3fd7fa8dc124ecde847e8fe8de05
parentb0c383524dc1d44f4cd91c6f6876ef898aa50d9d (diff)
downloadrpmbuild-remote-e9119a952d721b340584092853490c393172099c.zip
rpmbuild-remote-e9119a952d721b340584092853490c393172099c.tar.gz
rpmbuild-remote-e9119a952d721b340584092853490c393172099c.tar.xz
Only create if it doesn't already exist
-rwxr-xr-xrpmbuild-remote.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/rpmbuild-remote.py b/rpmbuild-remote.py
index 069c6d2..8d245cf 100755
--- a/rpmbuild-remote.py
+++ b/rpmbuild-remote.py
@@ -138,7 +138,8 @@ def log_regex(build_output):
out.close()
def get_mock_results(session, dest, sout, serr):
- os.mkdirs(dest)
+ if not dest:
+ os.makedirs(dest)
out = open(os.path.join(dest, 'mock.stdout'), 'w+')
out.write(sout.read())
out.close()
@@ -152,7 +153,8 @@ def get_mock_results(session, dest, sout, serr):
get_files(os.path.join(dest, 'build.log'), dest)
def get_rpmbuild_results(session, dest, sout, serr):
- os.mkdirs(dest)
+ if not dest:
+ os.makedirs(dest)
out = open(os.path.join(dest, 'rpmbuild.stdout', 'w+'))
out.write(sout.read())
out.close()