Skip to content

Commit

Permalink
try to log stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
abtink committed Nov 1, 2024
1 parent 2f8dbcc commit dc09874
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pylibs/otns/cli/OTNS.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
"""
Expand Down

0 comments on commit dc09874

Please sign in to comment.