[projects/pld-ftp-admin] Use correct dictionary key checks
baggins
baggins at pld-linux.org
Sun Feb 28 19:59:37 CET 2021
commit 5605351f2e57f2c65952e4a5a560578783b35e84
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Feb 28 19:59:20 2021 +0100
Use correct dictionary key checks
wwwbin/clean-dups.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/wwwbin/clean-dups.py b/wwwbin/clean-dups.py
index fa084e9..dfda371 100755
--- a/wwwbin/clean-dups.py
+++ b/wwwbin/clean-dups.py
@@ -120,8 +120,8 @@ for file in os.listdir(dir):
name = m.group(1)
- if files.has_key(name):
- if dupes.has_key(name):
+ if name in files:
+ if name in dupes:
dupes[name].append(file)
else:
dupes[name] = [ files[name] ]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/5605351f2e57f2c65952e4a5a560578783b35e84
More information about the pld-cvs-commit
mailing list