From 1e57fb4609fc2996a2c944db80fce41b9b596c47 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 30 Sep 2021 23:04:59 +0200 Subject: [PATCH] expect a broken pipe --- csdr/module/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/csdr/module/__init__.py b/csdr/module/__init__.py index 906d98f..8e3c703 100644 --- a/csdr/module/__init__.py +++ b/csdr/module/__init__.py @@ -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)