expect a broken pipe

This commit is contained in:
Jakob Ketterl 2021-09-30 23:04:59 +02:00
parent 0b64b4ac97
commit 1e57fb4609
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ class Module(BaseModule, metaclass=ABCMeta):
data = read()
except ValueError:
pass
except BrokenPipeError:
break
if data is None or isinstance(data, bytes) and len(data) == 0:
break
write(data)