]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
Migrate ac-th-diff.py to python3
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 25 Oct 2020 07:38:06 +0000 (08:38 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 25 Oct 2020 07:38:06 +0000 (08:38 +0100)
wwwbin/ac-th-diff.py

index b8a518d09adf7082fe7a664ede819af0c3fbd674..d8d0362366c6c8878baf2ac9caeec744a0479c43 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import os
 import re
@@ -22,7 +22,7 @@ def getname(file):
        #f = open(file, 'rb')
        #rpmlead = f.read(96)
        #f.close()
-       #data = struct.unpack("6B2h66s2h16s", rpmlead)
+       #data = struct.unpack(b"6B2h66s2h16s", rpmlead)
        #name = data[8].strip()
        #print name
        m = re_n.match(file)
@@ -42,16 +42,16 @@ for rpm in os.listdir(thdir):
 thpkg.sort()
 acpkg.sort()
 
-print "*****************************************************"
-print "Packages in AC repo that are not in TH repo:"
+print("*****************************************************")
+print("Packages in AC repo that are not in TH repo:")
 for pkg in acpkg:
        if pkg not in thpkg:
-               print pkg
+               print(pkg)
 
-print
-print
-print "*****************************************************"
-print "Packages in TH repo that are not in AC repo:"
+print()
+print()
+print("*****************************************************")
+print("Packages in TH repo that are not in AC repo:")
 for pkg in thpkg:
        if pkg not in acpkg:
-               print pkg
+               print(pkg)
This page took 0.104841 seconds and 4 git commands to generate.