From 5be7ebe780b487175563eb4661955a07df1d30cd Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Mar 2017 17:13:44 +0100 Subject: [PATCH] Only call tool_cache.cleanup if tool_cache exists --- lib/galaxy/queue_worker.py | 3 ++- test/unit/tools/test_toolbox.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/queue_worker.py b/lib/galaxy/queue_worker.py index f3f8245b7e9..167be3e2339 100644 --- a/lib/galaxy/queue_worker.py +++ b/lib/galaxy/queue_worker.py @@ -87,7 +87,8 @@ def reload_tool(app, **kwargs): def reload_toolbox(app, **kwargs): log.debug("Executing toolbox reload on '%s'", app.config.server_name) reload_count = app.toolbox._reload_count - app.tool_cache.cleanup() + if app.tool_cache: + app.tool_cache.cleanup() app.toolbox = _get_new_toolbox(app) app.toolbox._reload_count = reload_count + 1 diff --git a/test/unit/tools/test_toolbox.py b/test/unit/tools/test_toolbox.py index a3856640aa1..70a50f7f246 100644 --- a/test/unit/tools/test_toolbox.py +++ b/test/unit/tools/test_toolbox.py @@ -430,6 +430,7 @@ class SimplifiedToolBox( ToolBox ): def __init__( self, test_case ): app = test_case.app # Handle app/config stuff needed by toolbox but not by tools. + app.tool_cache = None app.job_config.get_tool_resource_parameters = lambda tool_id: None app.config.update_integrated_tool_panel = True config_files = test_case.config_files