Added ability to abort the command chain by returning a true value from cmd.at_pre_cmd().

This commit is contained in:
Griatch 2014-08-26 09:09:55 +02:00
parent 58f6c05964
commit 545804dffe
2 changed files with 7 additions and 2 deletions

View file

@ -255,7 +255,9 @@ class Command(object):
def at_pre_cmd(self):
"""
This hook is called before self.parse() on all commands
This hook is called before self.parse() on all commands.
If this hook returns anything but False/None, the command
sequence is aborted.
"""
pass