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
+4 -4
View File
@@ -20,7 +20,7 @@ installdb = pisi.db.installdb.InstallDB()
def ask_action(msg, actions, default):
while True:
s = raw_input(msg)
s = eval(input(msg))
if len(s) == 0:
return default
else:
@@ -35,8 +35,8 @@ def get_installed_packages():
def check_changed_config_files(package):
all_files = installdb.get_files(package)
config_files = filter(lambda x: x.type == 'config', all_files.list)
config_paths = map(lambda x: "/" + str(x.path), config_files)
config_files = [x for x in all_files.list if x.type == 'config']
config_paths = ["/" + str(x.path) for x in config_files]
newconfig = []
for path in config_paths:
@@ -75,7 +75,7 @@ def check_changes():
if __name__ == "__main__":
if len(sys.argv) == 1:
print "Checking all packages"
print("Checking all packages")
check_changes()
if len(sys.argv) == 2:
check_package(sys.argv[1])