From 3541bd85b94897c3bd102643d5d60f0ad3d116fa Mon Sep 17 00:00:00 2001 From: "C. Michael Pilato" Date: Mon, 4 Jan 2021 10:48:12 -0500 Subject: [PATCH] Fix some would-be linting errors. --- tools/bump-copyright-years | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/bump-copyright-years b/tools/bump-copyright-years index d855f77..92b8200 100755 --- a/tools/bump-copyright-years +++ b/tools/bump-copyright-years @@ -26,7 +26,7 @@ _copyright_re = re.compile(r'Copyright (\(c\)|©) ([0-9]{4}-)?([0-9]{4}) ' def replace_end_year(path, year): try: lines = open(path, 'r').readlines() - except Exception as e: + except Exception: sys.stderr.write("WARNING: Unable to parse file as text: %s\n" % (path)) return for i in range(len(lines)): @@ -51,8 +51,9 @@ def bump_years_recursive(target_dir, year): if os.path.isfile(child_path): try: replace_end_year(child_path, year) - except Exception as e: - sys.stderr.write("ERROR bumping copyright in file: %s\n" % (child_path)) + except Exception: + sys.stderr.write("ERROR bumping copyright in file: %s\n" + % (child_path)) raise elif os.path.isdir(child_path): bump_years_recursive(child_path, year)