Skip to content

Commit ded8463

Browse files
Use OSError instead of the alias IOError or select.error (#358)
1 parent b8b1976 commit ded8463

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tasktiger/executor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,16 @@ def check_child_exit() -> Optional[int]:
334334
try:
335335
# Behavior of a would be blocking read()
336336
# Linux:
337-
# Python 2.7 Raises IOError
337+
# Python 2.7 Raises OSError
338338
# Python 3.x returns empty string
339339
#
340340
# macOS:
341341
# Returns empty string
342342
opened_fd.read(1)
343-
except IOError:
343+
except OSError:
344344
pass
345345

346-
except select.error as e:
346+
except OSError as e:
347347
if e.args[0] != errno.EINTR:
348348
raise
349349

0 commit comments

Comments
 (0)