Skip to content

Commit

Permalink
Use ImportError instead of ModuleNotFoundError
Browse files Browse the repository at this point in the history
Per review comment:
#1651 (comment)
  • Loading branch information
wkschwartz committed Jan 20, 2021
1 parent df3e334 commit 7a6de27
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions win32/Lib/pywin32_bootstrap.py
Expand Up @@ -9,14 +9,9 @@
import os


try:
Exc = ModuleNotFoundError # Introduced in Python 3.6
except NameError:
Exc = ImportError

try:
import pywin32_system32
except Exc:
except ImportError: # Python ≥3.6: replace ImportError with ModuleNotFoundError
pass
else:
# We're guaranteed only that __path__: Iterable[str]
Expand Down

0 comments on commit 7a6de27

Please sign in to comment.