[Tools] Fix static analyis issues

This commit addresses issues identified by LGTM for the various
independent (and mostly-independent) files in the Tools subdirectory.
The vast majority of the issues are trivial, and are things like unused
imports or catching BaseException. There was one true bug identified, a
global variable being changed in a function where it was not marked
global, but it only affected output quantity (the variable is named
"VERBOSE"). A couple of other issues identified variables that appear to
represent no-longer-existing options in the code. The options were left,
but a deprecation printout replaces the variable in the event the option
is provided.
This commit is contained in:
Chris Hennes
2021-02-25 22:48:01 -06:00
committed by wwmayer
parent bcb070def1
commit e2bb84fd2f
22 changed files with 144 additions and 183 deletions

View File

@@ -11,7 +11,6 @@ def main():
input=""
output="."
dir="."
try:
opts, args = getopt.getopt(sys.argv[1:], "dso:", ["dir=","src=","out="])
@@ -20,7 +19,7 @@ def main():
for o, a in opts:
if o in ("-d", "--dir"):
dir = a
print ("The %s option is deprecated. Ignoring." % (o))
if o in ("-s", "--src"):
input = a
if o in ("-o", "--out"):