From 5cbdb15cdbe2254ead37917f00769b2d77bd60a8 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 30 Nov 2014 15:08:14 -0600 Subject: [PATCH] Only conditionally import Session in db/util.py --- mediagoblin/db/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mediagoblin/db/util.py b/mediagoblin/db/util.py index 515fd6cd..7c026691 100644 --- a/mediagoblin/db/util.py +++ b/mediagoblin/db/util.py @@ -17,10 +17,14 @@ import sys from mediagoblin import mg_globals as mgg -from mediagoblin.db.base import Session from mediagoblin.db.models import MediaEntry, Tag, MediaTag, Collection from mediagoblin.gmg_commands.dbupdate import gather_database_data +from mediagoblin.tools.transition import DISABLE_GLOBALS + +if not DISABLE_GLOBALS: + from mediagoblin.db.base import Session + ########################## # Random utility functions ########################## -- 2.25.1