make WindowsError available only on windows (#5036)

This commit is contained in:
Akuli
2021-02-20 14:36:21 +02:00
committed by GitHub
parent 1184e6e42b
commit 64575f4ec2

View File

@@ -1297,7 +1297,8 @@ class OSError(Exception):
EnvironmentError = OSError
IOError = OSError
WindowsError = OSError
if sys.platform == "win32":
WindowsError = OSError
class ArithmeticError(_StandardError): ...
class AssertionError(_StandardError): ...