Commit e1d81135 authored by Fantix King's avatar Fantix King

Added __bool__ for PY3 next to __nonzero__.

parent 5018e487
......@@ -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