Only call tool_cache.cleanup if tool_cache exists

This commit is contained in:
mvdbeek
2017-03-24 17:32:29 +01:00
parent c91c988c85
commit 5be7ebe780
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -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
+1
View File
@@ -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