[projects/pld-builder.new] - try to make tmpdir when it doesn't exist

draenog draenog at pld-linux.org
Thu Nov 29 18:49:17 CET 2012


commit fa16b7e5f03b9da6dcc20e0431a1e278086bca8b
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Thu Nov 29 16:50:35 2012 +0000

    - try to make tmpdir when it doesn't exist

 PLD_Builder/request.py | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/PLD_Builder/request.py b/PLD_Builder/request.py
index a01d593..195b1c8 100644
--- a/PLD_Builder/request.py
+++ b/PLD_Builder/request.py
@@ -230,6 +230,12 @@ class Batch:
         # + /usr/bin/bzip2 -dc /home/services/builder/rpm/packages/kernel/patch-2.6.27.61.bz2
         # patch: **** Can't rename file /tmp/B.a1b1d3/poKWwRlp to drivers/scsi/hosts.c : No such file or directory
         path = os.path.join(self._topdir, 'BUILD', 'tmp')
+        if not os.path.isdir(path):
+            try:
+                os.mkdir(path)
+            except OSError as e:
+                log.error("Cannot create directory %s: %s" % (path, e.strerror))
+                raise
         return path
 
     def is_done(self):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/fa16b7e5f03b9da6dcc20e0431a1e278086bca8b



More information about the pld-cvs-commit mailing list