catch exception on closed inputs
This commit is contained in:
parent
031c937c0c
commit
ef2ec1e1c5
@ -54,7 +54,11 @@ class output(object):
|
|||||||
def copy():
|
def copy():
|
||||||
run = True
|
run = True
|
||||||
while run:
|
while run:
|
||||||
data = read()
|
data = None
|
||||||
|
try:
|
||||||
|
data = read()
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
if data is None or (isinstance(data, bytes) and len(data) == 0):
|
if data is None or (isinstance(data, bytes) and len(data) == 0):
|
||||||
run = False
|
run = False
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user