]> git.decadent.org.uk Git - dak.git/blobdiff - dak/split_done.py
Adding install-info-used-in-maintainer-script to the non-fatal
[dak.git] / dak / split_done.py
index 5f8faddaf8e4041e05fffdc1b0ef7915ed91547b..87b38827706ac752a17afc91f7a629070f9c3a08 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
 
+""" Split queue/done into date based subdirectories """
 # Copyright (C) 2004, 2005, 2006  James Troup <james@nocrew.org>
+# Copyright (C) 2008  Joerg Jaspert <joerg@debian.org>
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +28,7 @@ from daklib import utils
 def main():
     Cnf = utils.get_conf()
     count = 0
-    move_date = int(time.time())-(30*84600)
+    move_date = int(time.time())
     os.chdir(Cnf["Dir::Queue::Done"])
     files = glob.glob("%s/*" % (Cnf["Dir::Queue::Done"]))
     for filename in files:
@@ -41,7 +43,8 @@ def main():
                 os.makedirs(dirname)
             dest = dirname + '/' + os.path.basename(filename)
             if os.path.exists(dest):
-                utils.fubar("%s already exists." % (dest))
+                utils.warn("%s already exists." % (dest))
+                continue
             print "Move: %s -> %s" % (filename, dest)
             os.rename(filename, dest)
             count = count + 1