@@ -99,6 +99,8 @@ def __init__(self, interface: str, host: str, port: int) -> None:
9999 http .client .BadStatusLine ,
100100 socket .error ,
101101 socket .gaierror ,
102+ TimeoutError ,
103+ OSError ,
102104 ):
103105 self .online = False
104106 elif self .interface == "rigctld" :
@@ -271,6 +273,8 @@ def sendcwxmlrpc(self, texttosend):
271273 http .client .BadStatusLine ,
272274 http .client .CannotSendRequest ,
273275 http .client .ResponseNotReady ,
276+ TimeoutError ,
277+ OSError ,
274278 ) as exception :
275279 self .online = False
276280 logger .debug ("%s" , f"{ exception } " )
@@ -290,6 +294,8 @@ def set_flrig_cw_send(self, send: bool) -> None:
290294 http .client .CannotSendRequest ,
291295 http .client .ResponseNotReady ,
292296 ValueError ,
297+ TimeoutError ,
298+ OSError ,
293299 ) as exception :
294300 self .online = False
295301 logger .debug ("%s" , f"{ exception } " )
@@ -308,6 +314,8 @@ def set_flrig_cw_speed(self, speed):
308314 http .client .CannotSendRequest ,
309315 http .client .ResponseNotReady ,
310316 ValueError ,
317+ TimeoutError ,
318+ OSError ,
311319 ) as exception :
312320 self .online = False
313321 logger .debug ("%s" , f"{ exception } " )
@@ -339,6 +347,8 @@ def __getvfo_flrig(self) -> str:
339347 http .client .CannotSendRequest ,
340348 http .client .ResponseNotReady ,
341349 AttributeError ,
350+ TimeoutError ,
351+ OSError ,
342352 ) as exception :
343353 self .online = False
344354 logger .debug (f"{ exception = } " )
@@ -396,6 +406,8 @@ def __getmode_flrig(self) -> str:
396406 http .client .CannotSendRequest ,
397407 http .client .ResponseNotReady ,
398408 AttributeError ,
409+ TimeoutError ,
410+ OSError ,
399411 ) as exception :
400412 self .online = False
401413 logger .debug ("%s" , f"{ exception } " )
@@ -454,6 +466,8 @@ def __getbw_flrig(self):
454466 http .client .CannotSendRequest ,
455467 http .client .ResponseNotReady ,
456468 AttributeError ,
469+ TimeoutError ,
470+ OSError ,
457471 ) as exception :
458472 self .online = False
459473 logger .debug ("getbw_flrig: %s" , f"{ exception } " )
@@ -482,6 +496,8 @@ def __getpower_flrig(self):
482496 http .client .BadStatusLine ,
483497 http .client .CannotSendRequest ,
484498 http .client .ResponseNotReady ,
499+ TimeoutError ,
500+ OSError ,
485501 ) as exception :
486502 self .online = False
487503 logger .debug ("getpower_flrig: %s" , f"{ exception } " )
@@ -528,6 +544,8 @@ def __getptt_flrig(self):
528544 http .client .BadStatusLine ,
529545 http .client .CannotSendRequest ,
530546 http .client .ResponseNotReady ,
547+ TimeoutError ,
548+ OSError ,
531549 ) as exception :
532550 self .online = False
533551 logger .debug ("%s" , f"{ exception } " )
@@ -578,6 +596,8 @@ def __get_mode_list_flrig(self):
578596 http .client .CannotSendRequest ,
579597 http .client .ResponseNotReady ,
580598 AttributeError ,
599+ TimeoutError ,
600+ OSError ,
581601 ) as exception :
582602 self .online = False
583603 logger .debug ("%s" , f"{ exception } " )
@@ -633,6 +653,8 @@ def __setvfo_flrig(self, freq: str) -> bool:
633653 http .client .CannotSendRequest ,
634654 http .client .ResponseNotReady ,
635655 AttributeError ,
656+ TimeoutError ,
657+ OSError ,
636658 ) as exception :
637659 self .online = False
638660 logger .debug ("setvfo_flrig: %s" , f"{ exception } " )
@@ -685,6 +707,8 @@ def __setmode_flrig(self, mode: str) -> bool:
685707 http .client .CannotSendRequest ,
686708 http .client .ResponseNotReady ,
687709 AttributeError ,
710+ TimeoutError ,
711+ OSError ,
688712 ) as exception :
689713 self .online = False
690714 logger .debug (f"{ exception = } " )
@@ -734,6 +758,8 @@ def __setpower_flrig(self, power):
734758 http .client .CannotSendRequest ,
735759 http .client .ResponseNotReady ,
736760 AttributeError ,
761+ TimeoutError ,
762+ OSError ,
737763 ) as exception :
738764 self .online = False
739765 logger .debug ("setpower_flrig: %s" , f"{ exception } " )
@@ -805,6 +831,8 @@ def __ptt_on_flrig(self):
805831 http .client .CannotSendRequest ,
806832 http .client .ResponseNotReady ,
807833 AttributeError ,
834+ TimeoutError ,
835+ OSError ,
808836 ) as exception :
809837 self .online = False
810838 logger .debug ("%s" , f"{ exception } " )
@@ -850,6 +878,8 @@ def __ptt_off_flrig(self):
850878 http .client .CannotSendRequest ,
851879 http .client .ResponseNotReady ,
852880 AttributeError ,
881+ TimeoutError ,
882+ OSError ,
853883 ) as exception :
854884 self .online = False
855885 logger .debug ("%s" , f"{ exception } " )
@@ -917,6 +947,8 @@ def __send_cat_string_flrig(self, cmd, thisishex):
917947 http .client .CannotSendRequest ,
918948 http .client .ResponseNotReady ,
919949 AttributeError ,
950+ TimeoutError ,
951+ OSError ,
920952 ) as exception :
921953 self .online = False
922954 logger .debug ("%s" , f"{ exception } " )
0 commit comments