Skip to content

Commit

Permalink
Use OSError instead of the alias IOError or select.error (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
lightswitch05 authored Dec 4, 2024
1 parent b8b1976 commit ded8463
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasktiger/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,16 @@ def check_child_exit() -> Optional[int]:
try:
# Behavior of a would be blocking read()
# Linux:
# Python 2.7 Raises IOError
# Python 2.7 Raises OSError
# Python 3.x returns empty string
#
# macOS:
# Returns empty string
opened_fd.read(1)
except IOError:
except OSError:
pass

except select.error as e:
except OSError as e:
if e.args[0] != errno.EINTR:
raise

Expand Down

0 comments on commit ded8463

Please sign in to comment.