Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OSError instead of the alias IOError or select.error #358

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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