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,17 +147,18 @@ 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:
|
||||
print()
|
||||
print('-----------------')
|
||||
print()
|
||||
def _postcmd(self, stop: bool, _: str) -> bool:
|
||||
if not stop:
|
||||
print()
|
||||
print('-----------------')
|
||||
print()
|
||||
return stop
|
||||
|
||||
|
||||
|
|
|
@ -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