Skip to content

Commit

Permalink
Use hasattr when testing for attribute
Browse files Browse the repository at this point in the history
Co-authored-by: Marius van den Beek <[email protected]>
  • Loading branch information
nuwang and mvdbeek authored Dec 13, 2022
1 parent ba0af70 commit 6519dfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy_test/base/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _request_celery_app(self, celery_session_app, celery_config):
if os.environ.get("GALAXY_TEST_EXTERNAL") is None:
from galaxy.celery import celery_app

if celery_app.fork_pool:
if hasattr(celery_app, "fork_pool"):
celery_app.fork_pool.stop()
celery_app.fork_pool.join(timeout=5)

Expand Down

0 comments on commit 6519dfb

Please sign in to comment.