From: Yen Chi Hsuan Date: Sat, 3 Dec 2016 13:53:41 +0000 (+0800) Subject: [socks] Fix error reporting (#11355) X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=83442966194640d9bc00e7f3086aa5e8b25c4ae3;p=youtube-dl [socks] Fix error reporting (#11355) --- diff --git a/youtube_dl/socks.py b/youtube_dl/socks.py index 63d19b3a5..fece28062 100644 --- a/youtube_dl/socks.py +++ b/youtube_dl/socks.py @@ -60,7 +60,7 @@ class ProxyError(IOError): def __init__(self, code=None, msg=None): if code is not None and msg is None: - msg = self.CODES.get(code) and 'unknown error' + msg = self.CODES.get(code) or 'unknown error' super(ProxyError, self).__init__(code, msg)