diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-04-25 10:55:41 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-04-25 10:55:41 -0400 |
commit | cc27d0525f40ae5a7896992f4e42b8b9037d5b22 (patch) | |
tree | a8ca451a6fb356b305e56eefd193f2d6b3023898 /src/lib/Bcfg2/DBSettings.py | |
parent | 1ed010e2af5df7544dc316984736159de0c8a8ec (diff) | |
parent | c3edef5bd2b55266fee96327f17a093a0fb9cce4 (diff) | |
download | bcfg2-cc27d0525f40ae5a7896992f4e42b8b9037d5b22.tar.gz bcfg2-cc27d0525f40ae5a7896992f4e42b8b9037d5b22.tar.bz2 bcfg2-cc27d0525f40ae5a7896992f4e42b8b9037d5b22.zip |
Merge branch 'maint'
Conflicts:
misc/bcfg2.spec
src/lib/Bcfg2/Client/Client.py
src/lib/Bcfg2/Client/Tools/APK.py
src/lib/Bcfg2/Client/Tools/MacPorts.py
src/lib/Bcfg2/Client/Tools/Pacman.py
src/lib/Bcfg2/Client/Tools/YUM.py
src/lib/Bcfg2/Server/Admin/Minestruct.py
src/lib/Bcfg2/Server/Admin/Pull.py
src/lib/Bcfg2/Server/Admin/Viz.py
src/lib/Bcfg2/Server/Core.py
src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py
src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py
src/lib/Bcfg2/Server/Plugins/Properties.py
src/lib/Bcfg2/settings.py
src/sbin/bcfg2-crypt
src/sbin/bcfg2-info
src/sbin/bcfg2-lint
src/sbin/bcfg2-yum-helper
testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py
testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProperties.py
Diffstat (limited to 'src/lib/Bcfg2/DBSettings.py')
-rw-r--r-- | src/lib/Bcfg2/DBSettings.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/DBSettings.py b/src/lib/Bcfg2/DBSettings.py index 3b2edd849..c5b78ed0b 100644 --- a/src/lib/Bcfg2/DBSettings.py +++ b/src/lib/Bcfg2/DBSettings.py @@ -169,10 +169,10 @@ class PerApplicationRouter(object): """ Django database router for redirecting different applications to their own database """ - def _db_per_app(self, model, **hints): + def _db_per_app(self, model, **_): """ If a database with the same name as the application exists, use it. Otherwise use the default """ - return get_db_label(model._meta.app_label) + return get_db_label(model._meta.app_label) # pylint: disable=W0212 def db_for_read(self, model, **hints): """ Called when Django wants to find out what database to read from """ @@ -182,12 +182,14 @@ class PerApplicationRouter(object): """ Called when Django wants to find out what database to write to """ return self._db_per_app(model, **hints) - def allow_relation(self, obj1, obj2, **hints): + def allow_relation(self, obj1, obj2, **_): """ Called when Django wants to determine what relations to allow. Only allow relations within an app """ + # pylint: disable=W0212 return obj1._meta.app_label == obj2._meta.app_label + # pylint: enable=W0212 - def allow_syncdb(self, db, model): + def allow_syncdb(self, *_): """ Called when Django wants to determine which models to sync to a given database. Take the cowards way out and sync all models to all databases to allow for easy migrations. """ |