fix subshell returns

This commit is contained in:
evilchili 2022-12-10 10:38:11 -08:00
parent 4b6246096d
commit 335d67c9d2
2 changed files with 5 additions and 7 deletions

View File

@ -54,8 +54,8 @@ class CommandPrompt(BasePrompt):
session=self.manager.session,
create_ok=True
)
res = self.commands['_playlist'].start()
return True and res
self.commands['_playlist'].start()
return True
def start(): # pragma: no cover

View File

@ -35,12 +35,10 @@ class _playlist(BasePrompt):
return self._commands
def process(self, cmd, *parts):
res = True
if cmd in self.commands:
res = self.commands[cmd](parts)
else:
return True if self.commands[cmd](parts) else False
print(f"Command not understood: {cmd}")
return res is True
return True
def show(self, parts):
print(self.parent.playlist)