Merge "Bind outside of the try block"

This commit is contained in:
Jenkins
2014-01-03 14:21:43 +00:00
committed by Gerrit Code Review

View File

@@ -29,8 +29,8 @@ from taskflow.utils import threading_utils
@contextlib.contextmanager
def _autobind(task, bind_name, bind_func, **kwargs):
task.bind(bind_name, bind_func, **kwargs)
try:
task.bind(bind_name, bind_func, **kwargs)
yield task
finally:
task.unbind(bind_name, bind_func)