From fa0d86aba32c40d829f9f94411403221a48283e8 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 28 Nov 2016 21:12:22 +0100 Subject: DBSettings: Call django.setup() right after configuring the settings If required the DBSettings config hook will call django.setup right after configuring django with the required settings. So we can drop the calls to django.setup from all other places. --- src/lib/Bcfg2/Reporting/Reports.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/lib/Bcfg2/Reporting/Reports.py') diff --git a/src/lib/Bcfg2/Reporting/Reports.py b/src/lib/Bcfg2/Reporting/Reports.py index 7ba0265ae..e60b2e82e 100755 --- a/src/lib/Bcfg2/Reporting/Reports.py +++ b/src/lib/Bcfg2/Reporting/Reports.py @@ -327,8 +327,6 @@ class CLI(Bcfg2.Options.CommandRegistry): components=[self]) parser.add_options(self.subcommand_options) parser.parse() - if django.VERSION[0] == 1 and django.VERSION[1] >= 7: - django.setup() # pylint: disable=E1101 def run(self): """ Run bcfg2-reports """ -- cgit v1.2.3-1-g7c22