# 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
# 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 glob, os, stat, time
os.chdir(Cnf["Dir::Queue::Done"])
files = glob.glob("%s/*" % (Cnf["Dir::Queue::Done"]))
for filename in files:
if os.path.isfile(filename):
filemtime = os.stat(filename)[stat.ST_MTIME]
os.chdir(Cnf["Dir::Queue::Done"])
files = glob.glob("%s/*" % (Cnf["Dir::Queue::Done"]))
for filename in files:
if os.path.isfile(filename):
filemtime = os.stat(filename)[stat.ST_MTIME]
continue
mtime = time.gmtime(filemtime)
dirname = time.strftime("%Y/%m/%d", mtime)
continue
mtime = time.gmtime(filemtime)
dirname = time.strftime("%Y/%m/%d", mtime)
- daklib.utils.fubar("%s already exists." % (dest))
- print "Move: %s -> %s" % (filename, dest)
+ utils.warn("%s already exists." % (dest))
+ continue
+ print "Move: %s -> %s" % (filename, dest)
os.rename(filename, dest)
count = count + 1
print "Moved %d files." % (count)
os.rename(filename, dest)
count = count + 1
print "Moved %d files." % (count)