Add python3 support

This commit is contained in:
Safa Ariman
2019-06-06 01:31:19 +03:00
parent 68344a2d87
commit c90351220c
146 changed files with 806 additions and 1082 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ if __name__ == "__main__":
try:
packages = scanPSPEC(sys.argv[1])
except:
print "Usage: cleanArchives.py path2repo"
print("Usage: cleanArchives.py path2repo")
sys.exit(1)
if "--dry-run" in sys.argv:
@@ -54,10 +54,10 @@ if __name__ == "__main__":
files.append(URI.filename())
archiveFiles = os.listdir("/var/cache/pisi/archives/")
unneededFiles = filter(lambda x:x not in files, archiveFiles)
unneededFiles = [x for x in archiveFiles if x not in files]
for i in unneededFiles:
if not clean:
print("/var/cache/pisi/archives/%s" % i)
print(("/var/cache/pisi/archives/%s" % i))
else:
cleanArchives("/var/cache/pisi/archives/%s" % i)