From c1c8259e83499907716b25f671cc5f296b706a50 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Fri, 10 Apr 2015 11:23:46 -0400 Subject: [PATCH] Check to see if toolshed install is actually bound prior to disposing (exact same functionality here, but it's less chatty this way, since it might not be bound) --- lib/galaxy/webapps/galaxy/buildapp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index 4c57821e0f5..07266ad1bda 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -110,7 +110,9 @@ def app_factory( global_conf, **kwargs ): except: log.exception("Unable to dispose of pooled galaxy model database connections.") try: - galaxy.model.tool_shed_install.mapping.metadata.bind.dispose() + # This model may not actually be bound. + if galaxy.model.tool_shed_install.mapping.metadata.bind: + galaxy.model.tool_shed_install.mapping.metadata.bind.dispose() except: log.exception("Unable to dispose of pooled toolshed install model database connections.")