From 6022ef9be373005eb778b25af69bad17e8178cb9 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 29 Nov 2018 14:52:44 -0600 Subject: [PATCH] Don't assume app has configured a tempmon DB engine whoops --- tailbone/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tailbone/app.py b/tailbone/app.py index 8fe76c6e..69c42794 100644 --- a/tailbone/app.py +++ b/tailbone/app.py @@ -63,8 +63,9 @@ def make_rattail_config(settings): # configure database sessions tailbone.db.Session.configure(bind=rattail_config.rattail_engine) - tailbone.db.TempmonSession.configure(bind=rattail_config.tempmon_engine) tailbone.db.TrainwreckSession.configure(bind=rattail_config.trainwreck_engine) + if hasattr(rattail_config, 'tempmon_engine'): + tailbone.db.TempmonSession.configure(bind=rattail_config.tempmon_engine) # Make sure rattail config object uses our scoped session, to avoid # unnecessary connections (and pooling limits).