]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - wwwbin/clean-dups-old.py
Make ftp tools python3 ready
[projects/pld-ftp-admin.git] / wwwbin / clean-dups-old.py
index e0ba2a0dc6bc40eceb92a1414e0203775d2a99ec..27a8e9352eea7eeb6e78d240efeebf83bffee759 100755 (executable)
@@ -2,6 +2,8 @@
 # arekm, 2008
 # remove 
 
+from __future__ import print_function
+
 import os
 import re
 import time
@@ -44,7 +46,7 @@ for file in os.listdir(dir):
 
        m = re_nvr.match(file)
        if not m:
-               print "problem with: %s" % file
+               print("problem with: %s" % file)
                sys.exit(1)
 
        if len(sys.argv) == 0:
@@ -64,6 +66,6 @@ for file in os.listdir(dir):
        else:
                files[name] = file
 
-for i in dupes.iterkeys():
+for i in iter(dupes.keys()):
        for old in find_old(dupes[i])[1:]:
                os.system("/home/pld/admins/th/pld-ftp-admin/scripts/remove.py test %s" % old)
This page took 0.021431 seconds and 4 git commands to generate.