summaryrefslogtreecommitdiff
path: root/mpv.py
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2015-11-01 18:21:51 +0100
committerjaseg <code@jaseg.net>2015-11-01 18:22:54 +0100
commitfb1704c4dc5dbbb464d82382277ffab7bb0e4a27 (patch)
treeb33a22a305ba2142a09aedeaec1ff830c80ee803 /mpv.py
parent28b761627f7a39d81936abd07c0eeeb8a804c793 (diff)
downloadpython-mpv-fb1704c4dc5dbbb464d82382277ffab7bb0e4a27.tar.gz
python-mpv-fb1704c4dc5dbbb464d82382277ffab7bb0e4a27.tar.bz2
python-mpv-fb1704c4dc5dbbb464d82382277ffab7bb0e4a27.zip
Fixed accidental python2-ism in ynbool. Fixes #1
Thanks to u8sand from github for this.
Diffstat (limited to 'mpv.py')
-rw-r--r--mpv.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpv.py b/mpv.py
index ce8690b..f98c3b0 100644
--- a/mpv.py
+++ b/mpv.py
@@ -231,8 +231,8 @@ class ynbool:
def __init__(self, val=False):
self.val = bool(val and val not in (b'no', 'no'))
- def __nonzero__(self):
- return self.val
+ def __bool__(self):
+ return bool(self.val)
def __str__(self):
return 'yes' if self.val else 'no'