stop yielding None, which is an error in Twisted 24
This commit is contained in:
parent
96ddf39b5b
commit
d929617b9b
1 changed files with 0 additions and 2 deletions
|
|
@ -630,14 +630,12 @@ def cmdhandler(
|
||||||
if isinstance(ret, types.GeneratorType):
|
if isinstance(ret, types.GeneratorType):
|
||||||
# cmd.func() is a generator, execute progressively
|
# cmd.func() is a generator, execute progressively
|
||||||
_progressive_cmd_run(cmd, ret)
|
_progressive_cmd_run(cmd, ret)
|
||||||
ret = yield ret
|
|
||||||
# note that the _progressive_cmd_run will itself run
|
# note that the _progressive_cmd_run will itself run
|
||||||
# the at_post_cmd etc as it finishes; this is a bit of
|
# the at_post_cmd etc as it finishes; this is a bit of
|
||||||
# code duplication but there seems to be no way to
|
# code duplication but there seems to be no way to
|
||||||
# catch the StopIteration here (it's not in the same
|
# catch the StopIteration here (it's not in the same
|
||||||
# frame since this is in a deferred chain)
|
# frame since this is in a deferred chain)
|
||||||
else:
|
else:
|
||||||
ret = yield ret
|
|
||||||
# post-command hook
|
# post-command hook
|
||||||
yield cmd.at_post_cmd()
|
yield cmd.at_post_cmd()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue