ctl: fix initialization in control scripts (#6887)

This commit is contained in:
Frédéric Péters 2015-04-01 22:35:30 +02:00
parent 0ab4ac7b69
commit 2c9042feed
8 changed files with 8 additions and 8 deletions

View File

@ -33,7 +33,7 @@ class CmdBackup(Command):
def execute(self, base_options, sub_options, args):
import publisher
publisher.WcsPublisher.configure(self.config, sub_options.extra)
publisher.WcsPublisher.configure(self.config)
pub = publisher.WcsPublisher.create_publisher()
hostname = args[0]

View File

@ -61,7 +61,7 @@ class CmdConvertToSql(Command):
import publisher
self.config.remove_option('main', 'error_log')
publisher.WcsPublisher.configure(self.config, sub_options.extra)
publisher.WcsPublisher.configure(self.config)
pub = publisher.WcsPublisher.create_publisher()
hostname = args[0]

View File

@ -30,7 +30,7 @@ class CmdExportSettings(Command):
def execute(self, base_options, sub_options, args):
import publisher
self.config.remove_option('main', 'error_log')
publisher.WcsPublisher.configure(self.config, sub_options.extra)
publisher.WcsPublisher.configure(self.config)
pub = publisher.WcsPublisher.create_publisher()
pub.app_dir = os.path.join(pub.app_dir, sub_options.vhost)
pub.reload_cfg()

View File

@ -35,7 +35,7 @@ class CmdProcessBounce(Command):
import publisher
try:
publisher.WcsPublisher.configure(self.config, sub_options.extra)
publisher.WcsPublisher.configure(self.config)
pub = publisher.WcsPublisher.create_publisher()
except:
# not much we can do if we don't have a publisher object :/

View File

@ -48,7 +48,7 @@ class CmdRebuildIndexes(Command):
def execute(self, base_options, sub_options, args):
import publisher
publisher.WcsPublisher.configure(self.config, sub_options.extra)
publisher.WcsPublisher.configure(self.config)
pub = publisher.WcsPublisher.create_publisher()
app_dir = pub.app_dir

View File

@ -34,7 +34,7 @@ class CmdRunScript(Command):
def execute(self, base_options, sub_options, args):
import publisher
self.config.remove_option('main', 'error_log')
publisher.WcsPublisher.configure(self.config, sub_options.extra)
publisher.WcsPublisher.configure(self.config)
publisher = publisher.WcsPublisher.create_publisher()
publisher.app_dir = os.path.join(publisher.app_dir, sub_options.vhost)
publisher.set_config()

View File

@ -35,7 +35,7 @@ class CmdShell(Command):
def execute(self, base_options, sub_options, args):
import publisher
self.config.remove_option('main', 'error_log')
publisher.WcsPublisher.configure(self.config, sub_options.extra)
publisher.WcsPublisher.configure(self.config)
publisher = publisher.WcsPublisher.create_publisher()
publisher.app_dir = os.path.join(publisher.APP_DIR, args[0])
if not os.path.exists(publisher.app_dir):

View File

@ -67,7 +67,7 @@ class CmdTriggerJumps(Command):
import publisher
self.config.remove_option('main', 'error_log')
publisher.WcsPublisher.configure(self.config, sub_options.extra)
publisher.WcsPublisher.configure(self.config)
publisher = publisher.WcsPublisher.create_publisher()
publisher.app_dir = os.path.join(publisher.app_dir, sub_options.vhost)
publisher.set_config()