ctl: fix initialization in control scripts (#6887)
This commit is contained in:
parent
0ab4ac7b69
commit
2c9042feed
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 :/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue