gen: handle None in convert_yielded

This commit is contained in:
Antoine Pietri 2016-05-09 11:08:07 +00:00
parent c20c44d776
commit 447bf2e06b
1 changed files with 3 additions and 1 deletions

View File

@ -1215,7 +1215,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