Commit 864a35f6 authored by Yuxin Wu's avatar Yuxin Wu

fix compat for python2

parent 2cba9434
...@@ -28,7 +28,7 @@ class DataFlowReentrantGuard(object): ...@@ -28,7 +28,7 @@ class DataFlowReentrantGuard(object):
self._lock = threading.Lock() self._lock = threading.Lock()
def __enter__(self): def __enter__(self):
self._succ = self._lock.acquire(blocking=False) self._succ = self._lock.acquire(False)
if not self._succ: if not self._succ:
raise threading.ThreadError("This DataFlow cannot be reused under different threads!") raise threading.ThreadError("This DataFlow cannot be reused under different threads!")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment