Fixed accidental python2-ism in ynbool. Fixes #1

Thanks to u8sand from github for this.
This commit is contained in:
jaseg 2015-11-01 18:21:51 +01:00
parent 28b761627f
commit fb1704c4dc
1 changed files with 2 additions and 2 deletions

4
mpv.py
View File

@ -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'