Add target argument only if present in sig
This commit is contained in:
parent
324a8f4962
commit
ecabf6c9ce
@ -42,10 +42,11 @@ class TargetArgument(cli2.Argument):
|
|||||||
class Command(cli2.Command):
|
class Command(cli2.Command):
|
||||||
def setargs(self):
|
def setargs(self):
|
||||||
super().setargs()
|
super().setargs()
|
||||||
self['target'] = TargetArgument(
|
if 'target' in self.sig.parameters:
|
||||||
self,
|
self['target'] = TargetArgument(
|
||||||
self.sig.parameters['target'],
|
self,
|
||||||
)
|
self.sig.parameters['target'],
|
||||||
|
)
|
||||||
if 'actions' in self:
|
if 'actions' in self:
|
||||||
del self['actions']
|
del self['actions']
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user