Add ImportError attributes name, path for Python 3.3+ (#1849)

Reference: https://docs.python.org/3/library/exceptions.html#ImportError
This commit is contained in:
Marti Raudsepp
2018-02-01 17:38:26 +02:00
committed by Jelle Zijlstra
parent b5baedffb7
commit 15f07f5d03

View File

@@ -951,7 +951,10 @@ class BufferError(Exception): ...
class EOFError(Exception): ...
class FloatingPointError(ArithmeticError): ...
class IOError(EnvironmentError): ...
class ImportError(Exception): ...
class ImportError(Exception):
if sys.version_info >= (3, 3):
name = ... # type: str
path = ... # type: str
if sys.version_info >= (3, 6):
class ModuleNotFoundError(ImportError): ...
class IndexError(LookupError): ...