Browse Source

first command sometimes fails on TCP

boyska 4 months ago
parent
commit
63a293a5e7
1 changed files with 4 additions and 1 deletions
  1. 4 1
      sergio.py

+ 4 - 1
sergio.py

@@ -159,7 +159,10 @@ class Pira:
     def __init__(self, backend: Backends):
         self.log = logging.getLogger("Pira")
         self.backend = backend
-        self.set_variable("ECHO", "0")
+        try:
+            self.set_variable("ECHO", "0")
+        except CommandError:  # this sometimes fails, it's a fact
+            pass
 
     def recv_response(self) -> str:
         def msg_complete(s: str) -> bool: