Dangerous exception handling
Browsing through the code I found some unfortunate and possibly dangerous exception handling. I.e. places where we swallow all exception and continue on our way. I.e.
except: #alternatively except Exceptions...
For example in:
Also we use except: without the specific type which is too broad handling. In for example:
Although we still have times where we capture all exceptions and continue, all of them are enclosed in larger retry logic.
, this issue is more of an improvement to the code base than a bug that affecting users. Validation for this issue should not blocking the release.
I look for key word pass in each .py file.
pass on function call that non-related to try - except - I ignore these cases.
pass on try - except which has good explanation (commented) - I leave them be
otherwise, I remove the try-except block. The logic of the code should make sure that we do not need these except. If any test fails, I put back the try-except for the explicit exception and put a comment in place.