mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
prevent plugins to break help
prevent call of preprocessor if ${cmd_name} marker is accidentaly set, but cmdname is None. Also for cmd_option_list and cmd_usage overwrite _help_preprocess_* functions in Osc class
This commit is contained in:
parent
9a1b2d980a
commit
c78c8178e6
@ -206,6 +206,20 @@ class Osc(cmdln.Cmdln):
|
||||
help_msg = cmdln.Cmdln._help_preprocess(self, help, cmdname)
|
||||
return help_msg % conf.config
|
||||
|
||||
def _help_preprocess_cmd_name(self, help, cmdname=None):
|
||||
if cmdname is None:
|
||||
return help
|
||||
return cmdln.Cmdln._help_preprocess_cmd_name(self, help, cmdname)
|
||||
|
||||
def _help_preprocess_cmd_option_list(self, help, cmdname=None):
|
||||
if cmdname is None:
|
||||
return help
|
||||
return cmdln.Cmdln._help_preprocess_cmd_option_list(self, help, cmdname)
|
||||
|
||||
def _help_preprocess_cmd_usage(self, help, cmdname=None):
|
||||
if cmdname is None:
|
||||
return help
|
||||
return cmdln.Cmdln._help_preprocess_cmd_usage(self, help, cmdname)
|
||||
|
||||
def do_init(self, subcmd, opts, project, package=None):
|
||||
"""${cmd_name}: Initialize a directory as working copy
|
||||
|
Loading…
Reference in New Issue
Block a user