From 981b1ab77632ca02c790ed87badeb6ceabdef332 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sun, 22 Sep 2024 19:11:09 +0100 Subject: [PATCH] check_whence.py: use consistent naming Namely: file(name) and sym(link) ... which were swapped in a few places. One of which by yours truly :facepalm: Signed-off-by: Emil Velikov --- check_whence.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_whence.py b/check_whence.py index fd74a56a..c270ee60 100755 --- a/check_whence.py +++ b/check_whence.py @@ -99,7 +99,7 @@ def main(): sys.stderr.write("E: %s listed in WHENCE as File, but is directory\n" % name) ret = 1 - for name in set(fw for fw in whence_files if whence_files.count(fw) > 1): + for name in set(name for name in whence_files if whence_files.count(name) > 1): sys.stderr.write("E: %s listed in WHENCE twice\n" % name) ret = 1 @@ -107,7 +107,7 @@ def main(): sys.stderr.write("E: %s listed in WHENCE twice\n" % name) ret = 1 - for name in set(link for link in whence_files if os.path.islink(link)): + for name in set(file for file in whence_files if os.path.islink(file)): sys.stderr.write("E: %s listed in WHENCE as File, but is a symlink\n" % name) ret = 1 @@ -131,10 +131,10 @@ def main(): break valid_targets.add(dirname) - for name, target in sorted(links_list): + for link, target in sorted(links_list): if target not in valid_targets: sys.stderr.write( - "E: target %s of link %s in WHENCE" " does not exist\n" % (target, name) + "E: target %s of link %s in WHENCE" " does not exist\n" % (target, link) ) ret = 1