From: Jan Rękorajski Date: Sun, 28 Feb 2021 19:01:20 +0000 (+0100) Subject: Workaround for removed compare function to sorted() X-Git-Url: https://git.pld-linux.org/?p=projects%2Fpld-ftp-admin.git;a=commitdiff_plain;h=7d5a034d731b2253c46eae8d5ce60f4fa5a9eadc Workaround for removed compare function to sorted() https://docs.python.org/3.6/library/functools.html#functools.cmp_to_key --- 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 = {}