From e12870f1913c8ce2069cdf7b95da72b55fb879cd Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 17 Aug 2016 19:06:06 +0200 Subject: Bcfg2/manage: Remove old code from the old options parsing --- src/lib/Bcfg2/manage.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/lib/Bcfg2/manage.py b/src/lib/Bcfg2/manage.py index 2f97f6d96..b156deb0f 100755 --- a/src/lib/Bcfg2/manage.py +++ b/src/lib/Bcfg2/manage.py @@ -14,17 +14,10 @@ parser = Bcfg2.Options.get_parser() parser.add_options([Bcfg2.Options.PositionalArgument('django_command', nargs='*')]) parser.parse() -if django.VERSION[0] == 1 and django.VERSION[1] <= 6: - try: - imp.find_module('settings') # Assumed to be in the same directory. - except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) - sys.exit(1) - if __name__ == "__main__": if django.VERSION[0] == 1 and django.VERSION[1] >= 6: from django.core.management import execute_from_command_line execute_from_command_line(sys.argv[:1] + Bcfg2.Options.setup.django_command) else: - execute_manager(settings) + from django.core.management import execute_manager + execute_manager(Bcfg2.DBSettings.settings) -- cgit v1.2.3-1-g7c22