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

address OSError hierarchy Fixes #311 #312

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions six.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
import sys
import types

try:
from select import error as select_error
except ImportError:
select_error = None

__author__ = "Benjamin Peterson <[email protected]>"
__version__ = "1.13.0"

Expand All @@ -43,6 +48,7 @@
class_types = type,
text_type = str
binary_type = bytes
os_errors = OSError,

MAXSIZE = sys.maxsize
else:
Expand Down Expand Up @@ -71,6 +77,12 @@ def __len__(self):
MAXSIZE = int((1 << 63) - 1)
del X

os_errors = (
(EnvironmentError, select_error)
if select_error
else EnvironmentError,
)


def _add_doc(func, doc):
"""Add documentation to a function."""
Expand Down