Skip to content

Commit

Permalink
Use OSError instead of the alias IOError or select.error
Browse files Browse the repository at this point in the history
  • Loading branch information
lightswitch05 committed Nov 14, 2024
1 parent 625e2ec commit 5ae88c8
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 5ae88c8

Please sign in to comment.