diff --git a/six.py b/six.py index d0aece89f..19e2efbcf 100644 --- a/six.py +++ b/six.py @@ -28,6 +28,11 @@ import sys import types +try: + from select import error as select_error +except ImportError: + select_error = None + __author__ = "Benjamin Peterson " __version__ = "1.13.0" @@ -43,6 +48,7 @@ class_types = type, text_type = str binary_type = bytes + os_errors = OSError, MAXSIZE = sys.maxsize else: @@ -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."""