mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
A spot of future proofing
This commit is contained in:
parent
0f7b73d7c4
commit
db6243dfff
@ -22,8 +22,9 @@ class ModernHTTPSHandler(HTTPSHandler):
|
||||
if cert_file:
|
||||
self.ssl_context.load_cert_chain(cert_file, key_file)
|
||||
|
||||
def conn_factory(hostport):
|
||||
return httplib.HTTPSConnection(hostport, context=self.ssl_context)
|
||||
def conn_factory(hostport, **kw):
|
||||
kw['context'] = self.ssl_context
|
||||
return httplib.HTTPSConnection(hostport, **kw)
|
||||
return self.do_open(conn_factory, req)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user