Commit 5d6c9dd9 authored by Denis Bilenko's avatar Denis Bilenko

Merge pull request #359 from fantix/bool_nonzero

Added __bool__ for PY3 next to __nonzero__.
parents 5018e487 e1d81135
......@@ -153,8 +153,12 @@ class RunResult(object):
self.output = output
self.name = name
def __nonzero__(self):
return bool(self.code)
if six.PY3:
def __bool__(self):
return bool(self.code)
else:
def __nonzero__(self):
return bool(self.code)
def __int__(self):
return self.code
......
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