]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
Use correct dictionary key checks
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 28 Feb 2021 18:59:20 +0000 (19:59 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 28 Feb 2021 18:59:20 +0000 (19:59 +0100)
wwwbin/clean-dups.py

index fa084e9beac8f4b075560e3d23eb847e67e3c72e..dfda3717b87889c604f424cda41f5b6df1b5e2ba 100755 (executable)
@@ -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] ]
This page took 0.154105 seconds and 4 git commands to generate.