Fixed accidental python2-ism in ynbool. Fixes #1
Thanks to u8sand from github for this.
This commit is contained in:
parent
28b761627f
commit
fb1704c4dc
1 changed files with 2 additions and 2 deletions
4
mpv.py
4
mpv.py
|
|
@ -231,8 +231,8 @@ class ynbool:
|
||||||
def __init__(self, val=False):
|
def __init__(self, val=False):
|
||||||
self.val = bool(val and val not in (b'no', 'no'))
|
self.val = bool(val and val not in (b'no', 'no'))
|
||||||
|
|
||||||
def __nonzero__(self):
|
def __bool__(self):
|
||||||
return self.val
|
return bool(self.val)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return 'yes' if self.val else 'no'
|
return 'yes' if self.val else 'no'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue