Avoided printing empty messages from RigControl.

This commit is contained in:
Marat Fayzullin 2024-09-29 23:41:29 -04:00
parent 83133d1020
commit 287f0c7061
1 changed files with 2 additions and 1 deletions

View File

@ -422,7 +422,8 @@ class RigControl():
readable, _, _ = select.select([self.rigctl.stdout, self.rigctl.stderr], [], [])
for pipe in readable:
rsp = pipe.read().decode("utf-8").strip()
logger.debug("STD{0}: {1}".format("ERR" if pipe==self.rigctl.stderr else "OUT", rsp))
if len(rsp) > 0:
logger.debug("STD{0}: {1}".format("ERR" if pipe==self.rigctl.stderr else "OUT", rsp))
except Exception as e:
logger.debug("RigControl thread done: {1}.".format(str(e)))
break