Transformers
Inference Endpoints
pantat88 commited on
Commit
4b1c27e
1 Parent(s): a9fe0c3

Update venvv.py

Browse files
Files changed (1) hide show
  1. venvv.py +9 -4
venvv.py CHANGED
@@ -36,12 +36,17 @@ def venv_in():
36
  while True:
37
  r, _, _ = select.select([ikan], [], [], 0.1)
38
  if ikan in r:
39
- jemuran = os.read(ikan, 1024).decode('utf-8', 'ignore')
40
- print(jemuran, end='')
41
-
 
 
 
 
 
42
  if proc.poll() is not None:
43
  break
44
-
45
  proc.wait()
46
  os.close(ikan)
47
  os.remove(fn)
 
36
  while True:
37
  r, _, _ = select.select([ikan], [], [], 0.1)
38
  if ikan in r:
39
+ try:
40
+ jemuran = os.read(ikan, 1024).decode('utf-8', 'ignore')
41
+ print(jemuran, end='')
42
+
43
+ except OSError as e:
44
+ if e.errno == errno.EIO:
45
+ break
46
+
47
  if proc.poll() is not None:
48
  break
49
+
50
  proc.wait()
51
  os.close(ikan)
52
  os.remove(fn)