]> git.decadent.org.uk Git - dak.git/blobdiff - dak/split_done.py
lotsa files
[dak.git] / dak / split_done.py
old mode 100644 (file)
new mode 100755 (executable)
index 2fc6c90..8b5b57f
@@ -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
 ################################################################################
 
 import glob, os, stat, time
-import daklib.utils
+from daklib import utils
 
 ################################################################################
 
 def main():
-    Cnf = daklib.utils.get_conf()
+    Cnf = utils.get_conf()
     count = 0
     move_date = int(time.time())-(30*84600)
     os.chdir(Cnf["Dir::Queue::Done"])
@@ -41,7 +43,7 @@ def main():
                 os.makedirs(dirname)
             dest = dirname + '/' + os.path.basename(filename)
             if os.path.exists(dest):
-                daklib.utils.fubar("%s already exists." % (dest))
+                utils.fubar("%s already exists." % (dest))
             print "Move: %s -> %s" % (filename, dest)
             os.rename(filename, dest)
             count = count + 1