lint: enable E722 do not use bare except

This commit is contained in:
Leonardo Lazzaro
2022-08-18 20:23:15 +02:00
parent 73b61717a9
commit 61bb4e783b
10 changed files with 11 additions and 10 deletions

View File

@@ -54,7 +54,7 @@ def bctester(testDir, input_basename, buildenv):
try:
bctest(testDir, testObj, buildenv)
logging.info("PASSED: " + testObj["description"])
except:
except Exception:
logging.info("FAILED: " + testObj["description"])
failed_testcases.append(testObj["description"])
@@ -96,7 +96,7 @@ def bctest(testDir, testObj, buildenv):
try:
with open(os.path.join(testDir, outputFn), encoding="utf8") as f:
outputData = f.read()
except:
except Exception:
logging.error("Output file " + outputFn + " cannot be opened")
raise
if not outputData: