MCPcopy Create free account
hub / github.com/boy-hack/hack-requests / _get_protocol

Method _get_protocol

HackRequests/HackRequests.py:55–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 self._get_protocol()
54
55 def _get_protocol(self):
56 if not self.protocol:
57 ps = (
58 'PROTOCOL_SSLv23', 'PROTOCOL_TLSv1',
59 'PROTOCOL_SSLv2', 'PROTOCOL_TLSv1_1', 'PROTOCOL_TLSv1_2')
60 for p in ps:
61 pa = getattr(ssl, p, None)
62 if pa:
63 self.protocol.append(pa)
64
65 '''
66 得到一个连接

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected