girder_worker
girder_worker copied to clipboard
Don't swallow AttributeErrors
The changes in commit https://github.com/girder/girder_worker/commit/af45e1f487ec3f5330e513a6f2c48df76796949a (and similar code throughout girder_worker) may catch far more missing attributes than just a lack of a JobManager
. This masks real errors, preventing them from bubbling to the top of the call stack, which makes development and debugging more difficult.
Ideally, all code should use hasattr
, getattr
, or perform type checking of the base object. If except AttributeError: pass
is ever used, it should not enclose code with function calls.