Added an abort condition to the cmd's funcparts chain.

This commit is contained in:
Griatch 2013-02-20 00:17:50 +01:00
parent 0121f36ac0
commit 65e370f93b

View file

@ -273,7 +273,9 @@ def cmdhandler(caller, raw_string, testing=False):
if hasattr(cmd, "funcparts"):
# yield on command parts (for multi-part delayed commands)
for funcpart in make_iter(cmd.funcparts):
yield funcpart()
err = yield funcpart()
# returning anything but a deferred/None will kill the chain
if err: break
# post-command hook
yield cmd.at_post_cmd()