MCPcopy Index your code
hub / github.com/python/cpython / getConnection

Method getConnection

Lib/logging/handlers.py:1281–1293  ·  view source on GitHub ↗

get a HTTP[S]Connection. Override when a custom connection is required, for example if there is a proxy.

(self, host, secure)

Source from the content-addressed store, hash-verified

1279 return record.__dict__
1280
1281 def getConnection(self, host, secure):
1282 """
1283 get a HTTP[S]Connection.
1284
1285 Override when a custom connection is required, for example if
1286 there is a proxy.
1287 """
1288 import http.client
1289 if secure:
1290 connection = http.client.HTTPSConnection(host, context=self.context)
1291 else:
1292 connection = http.client.HTTPConnection(host)
1293 return connection
1294
1295 def emit(self, record):
1296 """

Callers 1

emitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected