wip
This commit is contained in:
parent
ef7656ddea
commit
85e11755f7
@ -42,7 +42,8 @@ class Action:
|
|||||||
'''.strip(),
|
'''.strip(),
|
||||||
immediate=True,
|
immediate=True,
|
||||||
),
|
),
|
||||||
v=dict(
|
verbose=dict(
|
||||||
|
alias='v',
|
||||||
default=False,
|
default=False,
|
||||||
help='Verbose, like -d=visit,cmd,out',
|
help='Verbose, like -d=visit,cmd,out',
|
||||||
immediate=True,
|
immediate=True,
|
||||||
@ -117,7 +118,7 @@ class Action:
|
|||||||
|
|
||||||
output = Output(
|
output = Output(
|
||||||
regexp=self.regexps,
|
regexp=self.regexps,
|
||||||
debug='cmd,visit,out' if options['v'] else options['debug'],
|
debug='cmd,visit,out' if options['verbose'] else options['debug'],
|
||||||
)
|
)
|
||||||
results = []
|
results = []
|
||||||
for target in targets:
|
for target in targets:
|
||||||
|
|||||||
@ -160,6 +160,7 @@ class ConsoleScript(cli2.ConsoleScript):
|
|||||||
# ??? gotta be missing something, commenting meanwhile
|
# ??? gotta be missing something, commenting meanwhile
|
||||||
# action = copy.deepcopy(action)
|
# action = copy.deepcopy(action)
|
||||||
return await action(*self.parser.targets, **options)
|
return await action(*self.parser.targets, **options)
|
||||||
|
cb.__name__ = type(action).__name__
|
||||||
return cb
|
return cb
|
||||||
|
|
||||||
def action_class(self, action_class):
|
def action_class(self, action_class):
|
||||||
@ -214,6 +215,7 @@ class ConsoleScript(cli2.ConsoleScript):
|
|||||||
options.update(self.parser.options)
|
options.update(self.parser.options)
|
||||||
return await action_class(*_args, **kwargs)(*self.parser.targets, **options)
|
return await action_class(*_args, **kwargs)(*self.parser.targets, **options)
|
||||||
cb.__doc__ = (inspect.getdoc(action_class) or '').split("\n")[0]
|
cb.__doc__ = (inspect.getdoc(action_class) or '').split("\n")[0]
|
||||||
|
cb.__name__ = action_class.__name__
|
||||||
return cb
|
return cb
|
||||||
|
|
||||||
def call(self, command):
|
def call(self, command):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user