fix: ignore pyright LSP variable unbound warning
This commit is contained in:
parent
b8b6a1b2bf
commit
a50e6c75c8
@ -30,12 +30,11 @@ class UDPClient:
|
||||
self.debug = debug
|
||||
|
||||
def run(self):
|
||||
|
||||
# server cannot be reached, stop the client immediately
|
||||
if not self.pong_received:
|
||||
return
|
||||
|
||||
client_socket = None # shutup the variableNotBound warning
|
||||
|
||||
while True:
|
||||
try:
|
||||
client_socket = socket(AF_INET, SOCK_DGRAM)
|
||||
@ -106,7 +105,7 @@ class UDPClient:
|
||||
f"myftp> - {self.mode} - ConnectionRefusedError happened. Please restart the client program, make sure the server is running and/or put a different server name and server port."
|
||||
)
|
||||
finally:
|
||||
client_socket.close()
|
||||
client_socket.close() # type: ignore
|
||||
|
||||
# ping pong UDP
|
||||
def check_udp_server(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user