girder_worker icon indicating copy to clipboard operation
girder_worker copied to clipboard

Don't swallow AttributeErrors

Open brianhelba opened this issue 7 years ago • 0 comments

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.

brianhelba avatar Sep 07 '17 18:09 brianhelba