Merge pull request #1716 from seirl/master

gen: handle None in convert_yielded
This commit is contained in:
Ben Darnell 2017-03-26 11:46:00 -04:00 committed by GitHub
commit 95e9ef9fbf
1 changed files with 3 additions and 1 deletions

View File

@ -1249,7 +1249,9 @@ def convert_yielded(yielded):
.. versionadded:: 4.1
"""
# Lists and dicts containing YieldPoints were handled earlier.
if isinstance(yielded, (list, dict)):
if yielded is None:
return moment
elif isinstance(yielded, (list, dict)):
return multi(yielded)
elif is_future(yielded):
return yielded