From fbbd936841af6a4ae9ebdc52d4e87da60368353e Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 16 Aug 2012 10:01:43 -0400 Subject: Bcfg2.settings: bcfg2-web.conf is the default, unless bcfg2-web.conf doesn't exit and bcfg2.conf does --- src/lib/Bcfg2/Server/Admin/Syncdb.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/lib/Bcfg2/Server/Admin/Syncdb.py') diff --git a/src/lib/Bcfg2/Server/Admin/Syncdb.py b/src/lib/Bcfg2/Server/Admin/Syncdb.py index 72d3d469e..bff232b05 100644 --- a/src/lib/Bcfg2/Server/Admin/Syncdb.py +++ b/src/lib/Bcfg2/Server/Admin/Syncdb.py @@ -8,12 +8,9 @@ class Syncdb(Bcfg2.Server.Admin.Mode): __shorthelp__ = ("Sync the Django ORM with the configured database") __longhelp__ = __shorthelp__ + "\n\nbcfg2-admin syncdb" __usage__ = "bcfg2-admin syncdb" - options = {'configfile': Bcfg2.Options.CFILE, + options = {'web_configfile': Bcfg2.Options.WEB_CFILE, 'repo': Bcfg2.Options.SERVER_REPOSITORY} - def __init__(self, setup): - Bcfg2.Server.Admin.Mode.__init__(self, setup) - def __call__(self, args): import Bcfg2.Server.Admin Bcfg2.Server.Admin.Mode.__call__(self, args) @@ -26,7 +23,7 @@ class Syncdb(Bcfg2.Server.Admin.Mode): # the syncdb command, but we have to wait to set up the # environment until we've read the config, which has to wait # until we've parsed options. it's a windy, twisting road. - Bcfg2.settings.read_config(cfile=self.opts['configfile'], + Bcfg2.settings.read_config(cfile=self.opts['web_configfile'], repo=self.opts['repo']) setup_environ(Bcfg2.settings) import Bcfg2.Server.models -- cgit v1.2.3-1-g7c22