From dc098743a88ef82361dafcdd4252136cd129a069 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Fri, 1 Nov 2024 14:15:44 -0700 Subject: [PATCH] try to log stderr --- pylibs/otns/cli/OTNS.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pylibs/otns/cli/OTNS.py b/pylibs/otns/cli/OTNS.py index 81c162d5..d82452d8 100644 --- a/pylibs/otns/cli/OTNS.py +++ b/pylibs/otns/cli/OTNS.py @@ -58,7 +58,8 @@ def _launch_otns(self) -> None: self._otns = subprocess.Popen([self._otns_path] + self._otns_args, bufsize=16384, stdin=subprocess.PIPE, - stdout=subprocess.PIPE) + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) logging.info("otns process launched: %s", self._otns) def close(self) -> None: @@ -166,6 +167,10 @@ def _do_command(self, cmd: str) -> List[str]: output.append(line) + line = self._otns.stderr.readline() + if line != b'': + logging.info(f"ABTIN {line}") + def add(self, type: str, x: float = None, y: float = None, id=None, radio_range=None, executable=None, restore=False) -> int: """