summary refs log tree commit diff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-12-03 21:53:41 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-12-03 21:53:41 +0800
commit83442966194640d9bc00e7f3086aa5e8b25c4ae3 (patch)
tree02126bae96d8a5c82f38c1f90dbd8e621ff7342b
parenta94e7f4a0ca333aabf08adb1c329b4b5b8a5d897 (diff)
downloadyoutube-dl-83442966194640d9bc00e7f3086aa5e8b25c4ae3.tar.gz
youtube-dl-83442966194640d9bc00e7f3086aa5e8b25c4ae3.tar.xz
youtube-dl-83442966194640d9bc00e7f3086aa5e8b25c4ae3.zip
[socks] Fix error reporting (#11355)
-rw-r--r--youtube_dl/socks.py2
1 files changed, 1 insertions, 1 deletions
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)