From fb1704c4dc5dbbb464d82382277ffab7bb0e4a27 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 1 Nov 2015 18:21:51 +0100 Subject: Fixed accidental python2-ism in ynbool. Fixes #1 Thanks to u8sand from github for this. --- mpv.py | 4 ++-- 1 file 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' -- cgit