mirror of
https://github.com/anxdpanic/plugin.video.youtube.git
synced 2025-12-06 02:30:50 -08:00
More expansive handling of inconsistent urllib3 exception re-raising
- May be overly broad but the urllib3 behaviour is odd...
- Follow up to e509a864dc
This commit is contained in:
parent
2c701f800c
commit
ddc7b4900b
1 changed files with 5 additions and 2 deletions
|
|
@ -181,8 +181,11 @@ class RequestHandler(BaseHTTPRequestHandler, object):
|
|||
return
|
||||
except (HTTPError, OSError) as exc:
|
||||
self.close_connection = True
|
||||
if exc.errno not in self.SWALLOWED_ERRORS:
|
||||
raise exc
|
||||
self.log.exception('Request failed')
|
||||
if (isinstance(exc, HTTPError)
|
||||
or getattr(exc, 'errno', None) in self.SWALLOWED_ERRORS):
|
||||
return
|
||||
raise exc
|
||||
|
||||
def ip_address_status(self, ip_address):
|
||||
is_whitelisted = ip_address in self.whitelist_ips
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue