handle errors on write, too, courtesy of @luarvique
This commit is contained in:
parent
4a4e305ab5
commit
6ad24f64d8
|
|
@ -45,7 +45,10 @@ class Module(BaseModule, metaclass=ABCMeta):
|
|||
break
|
||||
if data is None or isinstance(data, bytes) and len(data) == 0:
|
||||
break
|
||||
write(data)
|
||||
try:
|
||||
write(data)
|
||||
except BrokenPipeError:
|
||||
break
|
||||
|
||||
return copy
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue