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).