mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-27 06:09:37 -07:00
remove Python2 some constructs/docs/comments (#10892)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.17) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.10) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.12) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.7) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.17) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.10) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.12) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.17+py3.7) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+alpine319+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+fedora39+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.17+ubuntu2004+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
* remove Python2 some constructs/docs/comments * add changelog frag
This commit is contained in:
parent
5f471b8e5b
commit
633bd6133a
12 changed files with 22 additions and 47 deletions
|
|
@ -234,17 +234,10 @@ def send_msg(msg, server='localhost', port='6667', channel=None, nick_to=None, k
|
|||
if use_tls:
|
||||
kwargs = {}
|
||||
if validate_certs:
|
||||
try:
|
||||
context = ssl.create_default_context()
|
||||
kwargs["server_hostname"] = server
|
||||
except AttributeError:
|
||||
raise Exception('Need at least Python 2.7.9 for SSL certificate validation')
|
||||
context = ssl.create_default_context()
|
||||
kwargs["server_hostname"] = server
|
||||
else:
|
||||
if getattr(ssl, 'PROTOCOL_TLS', None) is not None:
|
||||
# Supported since Python 2.7.13
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
else:
|
||||
context = ssl.SSLContext()
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
context.verify_mode = ssl.CERT_NONE
|
||||
irc = context.wrap_socket(irc, **kwargs)
|
||||
irc.connect((server, int(port)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue