diff options
author | Jan Rękorajski | 2021-02-28 19:01:20 (GMT) |
---|---|---|
committer | Jan Rękorajski | 2021-02-28 19:01:20 (GMT) |
commit | 7d5a034d731b2253c46eae8d5ce60f4fa5a9eadc (patch) | |
tree | ca18d4518d21d580695e022223b2971bde07ea88 | |
parent | 5605351f2e57f2c65952e4a5a560578783b35e84 (diff) | |
download | pld-ftp-admin-7d5a034d731b2253c46eae8d5ce60f4fa5a9eadc.zip pld-ftp-admin-7d5a034d731b2253c46eae8d5ce60f4fa5a9eadc.tar.gz |
Workaround for removed compare function to sorted()
https://docs.python.org/3.6/library/functools.html#functools.cmp_to_key
-rwxr-xr-x | wwwbin/clean-dups.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wwwbin/clean-dups.py b/wwwbin/clean-dups.py index dfda371..e0371b4 100755 --- a/wwwbin/clean-dups.py +++ b/wwwbin/clean-dups.py @@ -95,7 +95,7 @@ def compare(f1, f2): def find_old(files): - return sorted(files, compare) + return sorted(files, key=cmp_to_key(compare)) files = {} dupes = {} |