diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-09-25 00:54:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-25 00:54:25 (GMT) |
commit | 221fd84703c545408bbb4a6e0b58459651331f5c (patch) | |
tree | b7fbeb8590e192b205f85267871828279c152d6c /Lib | |
parent | 52ad33abbfb6637d74932617c7013bae0ccf6e32 (diff) | |
download | cpython-221fd84703c545408bbb4a6e0b58459651331f5c.zip cpython-221fd84703c545408bbb4a6e0b58459651331f5c.tar.gz cpython-221fd84703c545408bbb4a6e0b58459651331f5c.tar.bz2 |
bpo-38234: Cleanup getpath.c (GH-16367)
* search_for_prefix() directly calls reduce() if found is greater
than 0.
* Add calculate_pybuilddir() subfunction.
* search_for_prefix(): add path string buffer for readability.
* Fix some error handling code paths: release resources on error.
* calculate_read_pyenv(): rename tmpbuffer to filename.
* test.pythoninfo now also logs windows.dll_path
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/pythoninfo.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 28a9023..d2fa6c5 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -673,6 +673,13 @@ def collect_windows(info_add): res = bool(RtlAreLongPathsEnabled()) info_add('windows.RtlAreLongPathsEnabled', res) + try: + import _winapi + dll_path = _winapi.GetModuleFileName(sys.dllhandle) + info_add('windows.dll_path', dll_path) + except (ImportError, AttributeError): + pass + def collect_info(info): error = False |