From 8583eaec4f2f0301f1a3c78371407ba5b7799e9c Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 11 Dec 2024 15:25:17 -0500 Subject: [PATCH] try to ignore pytype failure --- truenas_api_client/utils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/truenas_api_client/utils.py b/truenas_api_client/utils.py index c784ca1..0338dba 100644 --- a/truenas_api_client/utils.py +++ b/truenas_api_client/utils.py @@ -151,12 +151,11 @@ def set_socket_options(socobj): # 3. for a maximum up to 5 times # # after 5 times (5 seconds of no response), the socket will be closed - # pytype: disable=attribute-error if plat in ('linux', 'freebsd', 'win32'): - socobj.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 1) + socobj.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 1) # pytype: disable=attribute-error + else: - socobj.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPALIVE, 1) - # pytype: enable=attribute-error + socobj.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPALIVE, 1) # pytype: disable=attribute-error socobj.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 1) socobj.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 5)