Skip to content
Permalink
Browse files

Use issubclass when comparing error types in proxy

Otherwise this misses ssl.SSLEOFError, for example.
  • Loading branch information...
spinda committed May 7, 2019
1 parent e7687d8 commit 16e8b1363cc076b9118776b968bd4773ce7918a9
Showing with 1 addition and 1 deletion.
  1. +1 −1 seleniumwire/proxy/proxy2.py
@@ -40,7 +40,7 @@ class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
def handle_error(self, request, client_address):
# surpress socket/ssl related errors
cls, e = sys.exc_info()[:2]
if cls is socket.error or cls is ssl.SSLError:
if issubclass(cls, socket.error) or issubclass(cls, ssl.SSLError):
pass
else:
return HTTPServer.handle_error(self, request, client_address)

0 comments on commit 16e8b13

Please sign in to comment.
You can’t perform that action at this time.