]> git.decadent.org.uk Git - dak.git/commitdiff
daklib/holding.py:
authorLuca Falavigna <dktrkranz@ries.debian.org>
Sat, 21 Nov 2009 10:23:20 +0000 (10:23 +0000)
committerLuca Falavigna <dktrkranz@ries.debian.org>
Sat, 21 Nov 2009 10:23:20 +0000 (10:23 +0000)
ftptrainees don't have write permissions to holding directory,
so allow them to store packages to be reviewed into TempPath.

Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
daklib/holding.py

index b637738a5af73d86f1b978137727407d7d9bcf5c..79d5ef7161a8de074f3a881a98e3af8bab5d7621 100644 (file)
@@ -46,6 +46,9 @@ class Holding(object):
 
             self.in_holding = {}
             self.holding_dir = Config()["Dir::Queue::Holding"]
+            # ftptrainees haven't access to holding, use a temp directory instead
+            if not os.access(self.holding_dir, os.W_OK):
+                self.holding_dir = Config()["TempPath::TempPath"]
 
     def copy_to_holding(self, filename):
         base_filename = os.path.basename(filename)