]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
Workaround for removed compare function to sorted()
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 28 Feb 2021 19:01:20 +0000 (20:01 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 28 Feb 2021 19:01:20 +0000 (20:01 +0100)
https://docs.python.org/3.6/library/functools.html#functools.cmp_to_key

wwwbin/clean-dups.py

index dfda3717b87889c604f424cda41f5b6df1b5e2ba..e0371b4262ad24708fcf431680a386740e624d37 100755 (executable)
@@ -95,7 +95,7 @@ def compare(f1, f2):
 
 
 def find_old(files):
 
 
 def find_old(files):
-       return sorted(files, compare)
+       return sorted(files, key=cmp_to_key(compare))
 
 files = {}
 dupes = {}
 
 files = {}
 dupes = {}
This page took 0.044828 seconds and 4 git commands to generate.