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

4
mpv.py
View file

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