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)

This commit is contained in:
Dannon Baker
2015-04-10 11:23:46 -04:00
parent c983f029cc
commit 30c004bd8c
+3 -1
View File
@@ -107,7 +107,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.")