@@ -100,6 +100,7 @@ def __init__(self, interface: str, host: str, port: int) -> None:
100100 socket .error ,
101101 socket .gaierror ,
102102 TimeoutError ,
103+ OSError ,
103104 ):
104105 self .online = False
105106 elif self .interface == "rigctld" :
@@ -273,6 +274,7 @@ def sendcwxmlrpc(self, texttosend):
273274 http .client .CannotSendRequest ,
274275 http .client .ResponseNotReady ,
275276 TimeoutError ,
277+ OSError ,
276278 ) as exception :
277279 self .online = False
278280 logger .debug ("%s" , f"{ exception } " )
@@ -293,6 +295,7 @@ def set_flrig_cw_send(self, send: bool) -> None:
293295 http .client .ResponseNotReady ,
294296 ValueError ,
295297 TimeoutError ,
298+ OSError ,
296299 ) as exception :
297300 self .online = False
298301 logger .debug ("%s" , f"{ exception } " )
@@ -312,6 +315,7 @@ def set_flrig_cw_speed(self, speed):
312315 http .client .ResponseNotReady ,
313316 ValueError ,
314317 TimeoutError ,
318+ OSError ,
315319 ) as exception :
316320 self .online = False
317321 logger .debug ("%s" , f"{ exception } " )
@@ -344,6 +348,7 @@ def __getvfo_flrig(self) -> str:
344348 http .client .ResponseNotReady ,
345349 AttributeError ,
346350 TimeoutError ,
351+ OSError ,
347352 ) as exception :
348353 self .online = False
349354 logger .debug (f"{ exception = } " )
@@ -402,6 +407,7 @@ def __getmode_flrig(self) -> str:
402407 http .client .ResponseNotReady ,
403408 AttributeError ,
404409 TimeoutError ,
410+ OSError ,
405411 ) as exception :
406412 self .online = False
407413 logger .debug ("%s" , f"{ exception } " )
@@ -461,6 +467,7 @@ def __getbw_flrig(self):
461467 http .client .ResponseNotReady ,
462468 AttributeError ,
463469 TimeoutError ,
470+ OSError ,
464471 ) as exception :
465472 self .online = False
466473 logger .debug ("getbw_flrig: %s" , f"{ exception } " )
@@ -490,6 +497,7 @@ def __getpower_flrig(self):
490497 http .client .CannotSendRequest ,
491498 http .client .ResponseNotReady ,
492499 TimeoutError ,
500+ OSError ,
493501 ) as exception :
494502 self .online = False
495503 logger .debug ("getpower_flrig: %s" , f"{ exception } " )
@@ -537,6 +545,7 @@ def __getptt_flrig(self):
537545 http .client .CannotSendRequest ,
538546 http .client .ResponseNotReady ,
539547 TimeoutError ,
548+ OSError ,
540549 ) as exception :
541550 self .online = False
542551 logger .debug ("%s" , f"{ exception } " )
@@ -588,6 +597,7 @@ def __get_mode_list_flrig(self):
588597 http .client .ResponseNotReady ,
589598 AttributeError ,
590599 TimeoutError ,
600+ OSError ,
591601 ) as exception :
592602 self .online = False
593603 logger .debug ("%s" , f"{ exception } " )
@@ -644,6 +654,7 @@ def __setvfo_flrig(self, freq: str) -> bool:
644654 http .client .ResponseNotReady ,
645655 AttributeError ,
646656 TimeoutError ,
657+ OSError ,
647658 ) as exception :
648659 self .online = False
649660 logger .debug ("setvfo_flrig: %s" , f"{ exception } " )
@@ -697,6 +708,7 @@ def __setmode_flrig(self, mode: str) -> bool:
697708 http .client .ResponseNotReady ,
698709 AttributeError ,
699710 TimeoutError ,
711+ OSError ,
700712 ) as exception :
701713 self .online = False
702714 logger .debug (f"{ exception = } " )
@@ -747,6 +759,7 @@ def __setpower_flrig(self, power):
747759 http .client .ResponseNotReady ,
748760 AttributeError ,
749761 TimeoutError ,
762+ OSError ,
750763 ) as exception :
751764 self .online = False
752765 logger .debug ("setpower_flrig: %s" , f"{ exception } " )
@@ -819,6 +832,7 @@ def __ptt_on_flrig(self):
819832 http .client .ResponseNotReady ,
820833 AttributeError ,
821834 TimeoutError ,
835+ OSError ,
822836 ) as exception :
823837 self .online = False
824838 logger .debug ("%s" , f"{ exception } " )
@@ -865,6 +879,7 @@ def __ptt_off_flrig(self):
865879 http .client .ResponseNotReady ,
866880 AttributeError ,
867881 TimeoutError ,
882+ OSError ,
868883 ) as exception :
869884 self .online = False
870885 logger .debug ("%s" , f"{ exception } " )
@@ -933,6 +948,7 @@ def __send_cat_string_flrig(self, cmd, thisishex):
933948 http .client .ResponseNotReady ,
934949 AttributeError ,
935950 TimeoutError ,
951+ OSError ,
936952 ) as exception :
937953 self .online = False
938954 logger .debug ("%s" , f"{ exception } " )
0 commit comments