summaryrefslogtreecommitdiff
path: root/gbp/tristate.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/tristate.py')
-rw-r--r--gbp/tristate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/tristate.py b/gbp/tristate.py
index 0a800ecd..81cb75c3 100644
--- a/gbp/tristate.py
+++ b/gbp/tristate.py
@@ -36,7 +36,7 @@ class Tristate(object):
self._state = self.AUTO
else:
self._state = self.OFF
- elif type(val) in [ type(t) for t in ("", u"") ]:
+ elif type(val) in [ type(t) for t in ("", "") ]:
if val.lower() in [ 'on', 'true' ]:
self._state = self.ON
elif val.lower() in [ 'auto' ]:
@@ -66,7 +66,7 @@ class Tristate(object):
else:
return 'off'
- def __nonzero__(self):
+ def __bool__(self):
"""
>>> Tristate('on').__nonzero__()
True