mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
jwutils.Cmds: Cmd.add_subcommands() fails for multiple commands
jwutils.Cmd.add_subcommands() had two issues. First, it failed for more than one command, and with that fixed, it only added the first command of a list of commands passed as an argument. This commit fixes both issues and leaves some logging and cleanup in place, which was used during debugging. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
6d6c48e6b8
commit
33d3b7a7b3
2 changed files with 28 additions and 22 deletions
|
|
@ -35,7 +35,7 @@ class Cmd(ABC): # export
|
|||
if isinstance(cmd, list):
|
||||
for c in cmd:
|
||||
self.add_subcommands(c)
|
||||
return
|
||||
return
|
||||
self.child_classes.append(cmd)
|
||||
|
||||
def add_arguments(self, parser):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue