Skip to content

Commit

Permalink
Suppress ImportError for winreg as the module is only available on so…
Browse files Browse the repository at this point in the history
…me platforms. Allows unit testing of module on non-Windows platforms.
  • Loading branch information
jaraco committed Aug 2, 2020
1 parent 30de1af commit 1215561
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion distutils/_msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import os
import subprocess
import winreg
import contextlib
with contextlib.suppress(ImportError):
import winreg

from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
CompileError, LibError, LinkError
Expand Down

0 comments on commit 1215561

Please sign in to comment.