[projects/pld-ftp-admin] Migrate ac-th-diff.py to python3

baggins baggins at pld-linux.org
Sun Oct 25 08:38:23 CET 2020


commit f245c55577d88173ed2644fd009af9cc363be985
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Oct 25 08:38:06 2020 +0100

    Migrate ac-th-diff.py to python3

 wwwbin/ac-th-diff.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/wwwbin/ac-th-diff.py b/wwwbin/ac-th-diff.py
index b8a518d..d8d0362 100755
--- a/wwwbin/ac-th-diff.py
+++ b/wwwbin/ac-th-diff.py
@@ -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)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/f245c55577d88173ed2644fd009af9cc363be985



More information about the pld-cvs-commit mailing list