catch exception and replace with a debug message, refs #22

This commit is contained in:
Jakob Ketterl 2020-07-27 21:18:24 +02:00
parent 77ae13723d
commit 9b187140ff
1 changed files with 8 additions and 3 deletions

View File

@ -183,9 +183,14 @@ class AudioWriter(object):
stdout=subprocess.PIPE,
cwd=self.tmp_dir,
close_fds=True,
)
for line in decoder.stdout:
self.outputWriter.send((job.freq, line))
)
try:
for line in decoder.stdout:
self.outputWriter.send((job.freq, line))
except OSError:
decoder.stdout.flush()
# TODO uncouple parsing from the output so that decodes can still go to the map and the spotters
logger.debug("output has gone away while decoding job.")
try:
rc = decoder.wait(timeout=10)
if rc != 0: