Skip to content

Commit 19efacf

Browse files
authored
Merge pull request #3809 from bdbaddog/remove_pywin32_from_Util
Remove pywin32 from SCons.Util where it was used for reading registry
2 parents e2eabc5 + f299645 commit 19efacf

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
1717
From William Deegan:
1818
- Fix yacc tool, not respecting YACC set at time of tool initialization.
1919
- Refactor SCons.Tool to move all common shared and loadable module linking logic to SCons.Tool.linkCommon
20+
- Remove pywin32 usage from SCons.Util where it was used for accessing the registry. Python native winreg
21+
library already includes this functionality.
2022
- Remove using pywin32 to retrieve peak memory usage on Win32 for `--debug=memory`
2123

2224
From Michał Górny:

SCons/Util.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -648,22 +648,9 @@ def __get__(self, obj, cls):
648648
RegError = winreg.error
649649

650650
except ImportError:
651-
try:
652-
import win32api
653-
import win32con
654-
can_read_reg = 1
655-
hkey_mod = win32con
656-
657-
RegOpenKeyEx = win32api.RegOpenKeyEx
658-
RegEnumKey = win32api.RegEnumKey
659-
RegEnumValue = win32api.RegEnumValue
660-
RegQueryValueEx = win32api.RegQueryValueEx
661-
RegError = win32api.error
662-
663-
except ImportError:
664-
class _NoError(Exception):
665-
pass
666-
RegError = _NoError
651+
class _NoError(Exception):
652+
pass
653+
RegError = _NoError
667654

668655

669656
# Make sure we have a definition of WindowsError so we can

0 commit comments

Comments
 (0)