瀏覽代碼

first command sometimes fails on TCP

boyska 4 月之前
父節點
當前提交
63a293a5e7
共有 1 個文件被更改,包括 4 次插入1 次删除
  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: