# arekm, 2008
# remove
+from __future__ import print_function
+
import os
import re
import time
try:
fd1 = os.open(os.path.join(dir, f1), os.O_RDONLY)
except Exception, e:
- print e
+ print(e)
# ignore non-files
return 0
try:
fd2 = os.open(os.path.join(dir, f2), os.O_RDONLY)
except Exception, e:
- print e
+ print(e)
# ignore non-files
return 0
try:
h1 = ts.hdrFromFdno(fd1)
except Exception, e:
- print "hdrFromFdno for %s failed: %s" % (f1, e)
+ print("hdrFromFdno for %s failed: %s" % (f1, e))
os.close(fd1)
os.close(fd2)
return 0
try:
h2 = ts.hdrFromFdno(fd2)
except Exception, e:
- print "hdrFromFdno for %s failed: %s" % (f2, e)
+ print("hdrFromFdno for %s failed: %s" % (f2, e))
os.close(fd1)
os.close(fd2)
return 0
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:
else:
files[name] = file
-for i in dupes.iterkeys():
+for i in iter(dupes.keys()):
for old in find_old(dupes[i])[1:]:
- print "removing: %s" % old
+ print("removing: %s" % old)
os.system("/home/pld/admins/th/pld-ftp-admin/scripts/remove.py test %s" % old)