]> err.no Git - dak/commitdiff
Fix thinko regarding ctime and datetime
authorMark Hymers <mhy@debian.org>
Fri, 29 Jul 2011 14:27:06 +0000 (15:27 +0100)
committerMark Hymers <mhy@debian.org>
Fri, 29 Jul 2011 14:27:06 +0000 (15:27 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/clean_queues.py

index 7ec6afb3dd19acc3f454f2bfefcde08fc4c40c11..38b95485ba36742455b4d0deccdf728df49d7598 100755 (executable)
@@ -67,9 +67,11 @@ Clean out incoming directories.
 def init (cnf):
     global delete_date, del_dir
 
+    # Used for directory naming
     now_date = datetime.now()
 
-    delete_date = now_date - timedelta(seconds=int(Options["Days"]) * 84600)
+    # Used for working out times
+    delete_date = int(time.time())-(int(Options["Days"])*84600)
 
     morguedir = cnf.get("Dir::Morgue", os.path.join("Dir::Pool", 'morgue'))
     morguesubdir = cnf.get("Clean-Queues::MorgueSubDir", 'queue')