From: Ben Darnell Date: Wed, 12 Jun 2013 03:52:36 +0000 (-0400) Subject: Fix default IOLoop in Subprocess. X-Git-Tag: v3.1.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d088cb6973db73b5eb12812c440e8245f3fb4fdf;p=thirdparty%2Ftornado.git Fix default IOLoop in Subprocess. Exit callbacks would fail for Subprocesses that did not explicitly set an IOLoop. --- diff --git a/tornado/process.py b/tornado/process.py index 5f05b1828..9bc193c01 100644 --- a/tornado/process.py +++ b/tornado/process.py @@ -189,7 +189,7 @@ class Subprocess(object): _waiting = {} def __init__(self, *args, **kwargs): - self.io_loop = kwargs.pop('io_loop', None) + self.io_loop = kwargs.pop('io_loop', None) or ioloop.IOLoop.current() to_close = [] if kwargs.get('stdin') is Subprocess.STREAM: in_r, in_w = _pipe_cloexec()