summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/DBSettings.py
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2017-08-18 15:01:32 -0500
committerSol Jerome <sol.jerome@gmail.com>2017-08-18 15:01:32 -0500
commite193079d1779e4d66d80882e6f1c3ff9ba05619b (patch)
treeb47f262f3b7d57a1ddeefd0f2aeba3bb35539d18 /src/lib/Bcfg2/DBSettings.py
parentcd0f5f5f62376f7dc64e5c5c7d59a7c6bfcb918f (diff)
parent0fdabbcb4668d5f70f76c08a6e3216c5542e7457 (diff)
downloadbcfg2-e193079d1779e4d66d80882e6f1c3ff9ba05619b.tar.gz
bcfg2-e193079d1779e4d66d80882e6f1c3ff9ba05619b.tar.bz2
bcfg2-e193079d1779e4d66d80882e6f1c3ff9ba05619b.zip
Merge branch 'feature/travis-container' of https://github.com/AlexanderS/bcfg2
Diffstat (limited to 'src/lib/Bcfg2/DBSettings.py')
-rw-r--r--src/lib/Bcfg2/DBSettings.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/DBSettings.py b/src/lib/Bcfg2/DBSettings.py
index 254dfa4b8..ddcf66b44 100644
--- a/src/lib/Bcfg2/DBSettings.py
+++ b/src/lib/Bcfg2/DBSettings.py
@@ -21,7 +21,8 @@ try:
except ImportError:
HAS_SOUTH = False
-settings = dict( # pylint: disable=C0103
+# pylint: disable=C0103
+settings = dict(
TIME_ZONE=None,
TEMPLATE_DEBUG=False,
DEBUG=False,
@@ -106,8 +107,8 @@ def finalize_django_config(opts=None, silent=False):
OPTIONS=opts.db_opts,
SCHEMA=opts.db_schema))
- if hasattr(opts, "reporting_db_engine") and \
- opts.reporting_db_engine is not None:
+ if (hasattr(opts, "reporting_db_engine") and
+ opts.reporting_db_engine is not None):
settings['DATABASES']['Reporting'] = dict(
ENGINE="django.db.backends.%s" % opts.reporting_db_engine,
NAME=opts.reporting_db_name,
@@ -180,9 +181,9 @@ def upgrade_to_django_migrations(database, logger):
cursor.cursor.execute('SELECT migration FROM south_migrationhistory')
applied_migrations = [name for (name,) in cursor.fetchall()]
last_migration = sorted(applied_migrations).pop()
+ # django.db.DatabaseError is not working here, because we are
+ # using the low level api to interact directly with the database
except: # pylint: disable=W0702
- # django.db.DatabaseError is not working here, because we are
- # using the low level api to interact directly with the database
logger.debug("No south migration detected for database: %s." %
database)