Skip to content

Commit

Permalink
address OSError hierarchy Fixes benjaminp#311
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Nov 25, 2019
1 parent 33b584b commit 8e42d91
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit 8e42d91

Please sign in to comment.