No filename displayed when exception stops testrunner
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bandit |
Fix Released
|
Low
|
Jamie Finnigan |
Bug Description
If the exception suddenly stops the test runner, there's no relevant filename displayed. Additionally, exception could be queued for display at the end and bandit could attempt processing the remaining files.
Example output:
50.. 100.. 150.. 200.. 250.. 300.. 350.. Traceback (most recent call last):
File ".tox/py27/
sys.
File "/home/
b_mgr.
File "/home/
fname, fdata, self.b_ma, self.b_ts)
File "/home/
score = res.process(fdata)
.....
File "/home/
self.
File "/home/
self.
File "/home/
lines = linerange(node)
File "/home/
for n in ast.walk(node):
File "/usr/lib/
todo.
File "/usr/lib/
for name, field in iter_fields(node):
RuntimeError: maximum recursion depth exceeded
This doesn't indicate in which file did the exception happen.
Changed in bandit: | |
importance: | Wishlist → Low |
This is because we don't catch a generic error (or RuntimeError specifically) when analyzing files. We need to find the right level to catch a generic exception such that we can find the file we were analyzing.