cli: fix `done` not returning
The previous `Done` commands would not return properly. All `Done`/`Exit` commands have also gotten the common number 9
This commit is contained in:
parent
78fa3076b9
commit
634397cdaf
|
@ -289,7 +289,7 @@ class WorblehatCli(NumberedCmd):
|
|||
'f': do_abort,
|
||||
'doc': 'Abort changes',
|
||||
},
|
||||
8: {
|
||||
9: {
|
||||
'f': do_exit,
|
||||
'doc': 'Exit',
|
||||
},
|
||||
|
|
|
@ -147,14 +147,15 @@ class NumberedCmd(Cmd):
|
|||
except (ValueError, KeyError):
|
||||
return
|
||||
|
||||
self.funcs[i]['f'](self, arg)
|
||||
return self.funcs[i]['f'](self, arg)
|
||||
|
||||
|
||||
def default(self, arg: str):
|
||||
self._default(arg)
|
||||
return self._default(arg)
|
||||
|
||||
|
||||
def _postcmd(self, stop: bool, line: str) -> bool:
|
||||
def _postcmd(self, stop: bool, _: str) -> bool:
|
||||
if not stop:
|
||||
print()
|
||||
print('-----------------')
|
||||
print()
|
||||
|
|
|
@ -74,7 +74,7 @@ class BookcaseItemCli(NumberedCmd):
|
|||
'f': do_update_data,
|
||||
'doc': 'Pull updated data from online databases',
|
||||
},
|
||||
4: {
|
||||
9: {
|
||||
'f': do_done,
|
||||
'doc': 'Done',
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue