From 62c1db1141d93c8fb8b1804d6e0b0df3d3fbd9f8 Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Sat, 26 Aug 2017 11:00:04 -0400 Subject: [PATCH] Rename "input" to avoid redefining built-in We formerly used a variable named "input". This is legal in Python, but potentially confusing since there's a built-in named "input" that this shadows in that scope. Rename the variable, to avoid that confusion. This fixes the following pylint warning: W:1440, 8: Redefining built-in 'input' (redefined-builtin) Signed-off-by: David A. Wheeler --- flawfinder | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flawfinder b/flawfinder index fa64776..0d1b83b 100755 --- a/flawfinder +++ b/flawfinder @@ -1437,7 +1437,7 @@ def process_c_file(f, patch_infos): return if f == "-": - input = sys.stdin + my_input = sys.stdin else: # Symlinks should never get here, but just in case... if (not allowlink) and os.path.islink(f): @@ -1445,7 +1445,7 @@ def process_c_file(f, patch_infos): num_links_skipped = num_links_skipped + 1 return try: - input = open(f, "r") + my_input = open(f, "r") except BaseException: print("Error: failed to open", h(f)) sys.exit(1) @@ -1465,7 +1465,7 @@ def process_c_file(f, patch_infos): print("Examining", f) sys.stdout.flush() - text = "".join(input.readlines()) + text = "".join(my_input.readlines()) i = 0 while i < len(text):