From 83442966194640d9bc00e7f3086aa5e8b25c4ae3 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Sat, 3 Dec 2016 21:53:41 +0800 Subject: [PATCH] [socks] Fix error reporting (#11355) --- youtube_dl/socks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.40.0