mirror of
https://github.com/jtesta/ssh-audit.git
synced 2025-12-19 23:26:28 +01:00
Added Tox testing for Python 3.11. Fixed flake8 & pylint errors.
This commit is contained in:
@@ -86,7 +86,7 @@ class SSH_Socket(ReadBuf, WriteBuf):
|
||||
|
||||
# If the user has a preference for using IPv4 over IPv6 (or vice-versa), then sort the list returned by getaddrinfo() so that the preferred address type comes first.
|
||||
if len(self.__ip_version_preference) == 2:
|
||||
r = sorted(r, key=lambda x: x[0], reverse=(self.__ip_version_preference[0] == 6))
|
||||
r = sorted(r, key=lambda x: x[0], reverse=(self.__ip_version_preference[0] == 6)) # pylint: disable=superfluous-parens
|
||||
for af, socktype, _proto, _canonname, addr in r:
|
||||
if socktype == socket.SOCK_STREAM:
|
||||
yield af, addr
|
||||
|
||||
Reference in New Issue
Block a user