Skip to content

Commit

Permalink
Convert new code since 2020 with 2to3
Browse files Browse the repository at this point in the history
@Zaryob's valuable contribution is dated 2020. Since then, we've
been modifying the codebase further. Another pass of 2to3 is needed.
  • Loading branch information
livingsilver94 authored and Fabio Forni committed Aug 23, 2023
1 parent 586c750 commit b72c672
Show file tree
Hide file tree
Showing 28 changed files with 73 additions and 2,094 deletions.
2 changes: 1 addition & 1 deletion pisi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ def getRemoveOrder(cacheDir, pkgList):

# sort dictionary by value from PEP-265
from operator import itemgetter
return sorted(iter(sizes.items()), key=itemgetter(1), reverse=False)
return sorted(iter(list(sizes.items())), key=itemgetter(1), reverse=False)

def removeOrderByLimit(cacheDir, order, limit):
totalSize = 0
Expand Down
2 changes: 1 addition & 1 deletion pisi/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def unpack_dir(self, target_dir, callback=None):
old_path = "/" + old_path
if not new_path.startswith("/"):
new_path = "/" + new_path
print("Moving:", old_path, " -> ", new_path)
print(("Moving:", old_path, " -> ", new_path))
os.system("mv -f %s %s" % (old_path, new_path))
else:
raise
Expand Down
224 changes: 0 additions & 224 deletions pisi/cli/__init__.py.orig

This file was deleted.

Loading

0 comments on commit b72c672

Please sign in to comment.