1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-25 18:27:42 +00:00

[socks] Fix error reporting (#11355)

This commit is contained in:
Yen Chi Hsuan 2016-12-03 21:53:41 +08:00
parent a94e7f4a0c
commit 8344296619
No known key found for this signature in database
GPG key ID: 7F902A182457CA23

View file

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