@@ -89,7 +89,6 @@ def wrapper(*args, **kwds):
8989
9090    return  decorator 
9191
92- 
9392def  get_cid ():
9493    if  fcntl  is  None :
9594        return  None 
@@ -103,7 +102,6 @@ def get_cid():
103102    else :
104103        return  struct .unpack ("I" , r )[0 ]
105104
106- 
107105def  _have_socket_can ():
108106    """Check whether CAN sockets are supported on this host.""" 
109107    try :
@@ -114,7 +112,6 @@ def _have_socket_can():
114112        s .close ()
115113    return  True 
116114
117- 
118115def  _have_socket_can_isotp ():
119116    """Check whether CAN ISOTP sockets are supported on this host.""" 
120117    try :
@@ -125,7 +122,6 @@ def _have_socket_can_isotp():
125122        s .close ()
126123    return  True 
127124
128- 
129125def  _have_socket_can_j1939 ():
130126    """Check whether CAN J1939 sockets are supported on this host.""" 
131127    try :
@@ -136,7 +132,6 @@ def _have_socket_can_j1939():
136132        s .close ()
137133    return  True 
138134
139- 
140135def  _have_socket_rds ():
141136    """Check whether RDS sockets are supported on this host.""" 
142137    try :
@@ -147,7 +142,6 @@ def _have_socket_rds():
147142        s .close ()
148143    return  True 
149144
150- 
151145def  _have_socket_alg ():
152146    """Check whether AF_ALG sockets are supported on this host.""" 
153147    try :
@@ -158,7 +152,6 @@ def _have_socket_alg():
158152        s .close ()
159153    return  True 
160154
161- 
162155def  _have_socket_qipcrtr ():
163156    """Check whether AF_QIPCRTR sockets are supported on this host.""" 
164157    try :
@@ -169,7 +162,6 @@ def _have_socket_qipcrtr():
169162        s .close ()
170163    return  True 
171164
172- 
173165def  _have_socket_vsock ():
174166    """Check whether AF_VSOCK sockets are supported on this host.""" 
175167    cid  =  get_cid ()
@@ -210,7 +202,6 @@ def _have_socket_hyperv():
210202        s .close ()
211203    return  True 
212204
213- 
214205def  _find_service (expected_protocols ,
215206                  services_file = '/etc/services' ):
216207    if  not  os .path .exists (services_file ):
@@ -232,7 +223,6 @@ def _find_service(expected_protocols,
232223                return  service_name 
233224    return  None 
234225
235- 
236226@contextlib .contextmanager  
237227def  socket_setdefaulttimeout (timeout ):
238228    old_timeout  =  socket .getdefaulttimeout ()
0 commit comments