From 6519dfbf3fd479efa8487838816ada3bc0b6bf38 Mon Sep 17 00:00:00 2001 From: Nuwan Goonasekera <2070605+nuwang@users.noreply.github.com> Date: Tue, 13 Dec 2022 23:41:26 +0530 Subject: [PATCH] Use hasattr when testing for attribute Co-authored-by: Marius van den Beek --- lib/galaxy_test/base/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy_test/base/api.py b/lib/galaxy_test/base/api.py index b357ed01b9c8..7ccb906a4ac7 100644 --- a/lib/galaxy_test/base/api.py +++ b/lib/galaxy_test/base/api.py @@ -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)