From 447bf2e06b99c26c1a589e412f6f0c4246ad0b52 Mon Sep 17 00:00:00 2001 From: Antoine Pietri Date: Mon, 9 May 2016 11:08:07 +0000 Subject: [PATCH] gen: handle None in convert_yielded --- tornado/gen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tornado/gen.py b/tornado/gen.py index 7ed8ba87..2f750624 100644 --- a/tornado/gen.py +++ b/tornado/gen.py @@ -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