windows: drop some py2 compatibility code
The comment was wrong- the exception handler was the py3 case.
--- a/mercurial/windows.py Mon Jun 13 11:06:33 2022 -0400
+++ b/mercurial/windows.py Mon Jun 13 11:18:41 2022 -0400
@@ -14,6 +14,7 @@
import stat
import string
import sys
+import winreg # pytype: disable=import-error
from .i18n import _
from .pycompat import getattr
@@ -25,13 +26,6 @@
win32,
)
-try:
- import _winreg as winreg # pytype: disable=import-error
-
- winreg.CloseKey
-except ImportError:
- # py2 only
- import winreg # pytype: disable=import-error
osutil = policy.importmod('osutil')