Skip to content

Commit

Permalink
Remove some now-unnecessary calls to functools.partial
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Dec 8, 2012
1 parent 1ddbe82 commit 3c24b7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions tornado/ioloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,7 @@ def add_future(self, future, callback):
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.
Expand Down
2 changes: 1 addition & 1 deletion tornado/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def _try_cleanup_process(cls, pid):
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):
Expand Down

0 comments on commit 3c24b7b

Please sign in to comment.