🐛 Fix ok_timeout detection under Py2 as well

d291734 only fixed it for Py3 🤦‍♀️
This commit is contained in:
Gina Häußge committed 2019-03-01 16:24:32 +01:00
1 parent c27936a9db
commit 780948fe7d
1 file changed
+4
@@ -102,8 +102,12 @@ class FallbackValue(object):
class BooleanCallbackValue(object):
def __init__(self, callback):
assert callable(callback)
self.callback = callback
def __nonzero__(self):
return self.__bool__()
def __bool__(self):
return bool(self.callback())