]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Remove some now-unnecessary calls to functools.partial
authorBen Darnell <ben@bendarnell.com>
Sat, 8 Dec 2012 23:32:17 +0000 (18:32 -0500)
committerBen Darnell <ben@bendarnell.com>
Sat, 8 Dec 2012 23:32:17 +0000 (18:32 -0500)
tornado/ioloop.py
tornado/process.py

index 8567ab8020173f8ed1bc9ac73858fb7dd74e1821..fad33b0aedfffa44cdef603a945c27ef913a1a89 100644 (file)
@@ -359,8 +359,7 @@ class IOLoop(Configurable):
         assert isinstance(future, IOLoop._FUTURE_TYPES)
         callback = stack_context.wrap(callback)
         future.add_done_callback(
-            lambda future: self.add_callback(
-                functools.partial(callback, future)))
+            lambda future: self.add_callback(callback, future))
 
     def _run_callback(self, callback):
         """Runs a callback with error handling.
index 9e048c19347dcf20192f79ff9164e68e0f13135f..fa0be555f0dbeeea574d3c049d0c3f041af8567f 100644 (file)
@@ -268,7 +268,7 @@ class Subprocess(object):
         assert ret_pid == pid
         subproc = cls._waiting.pop(pid)
         subproc.io_loop.add_callback_from_signal(
-            functools.partial(subproc._set_returncode, status))
+            subproc._set_returncode, status)
 
     def _set_returncode(self, status):
         if os.WIFSIGNALED(status):