mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-131277: allow EnvironmentVarGuard to unset more than one environment variable at once (#131280)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
9558d22ac3
commit
3185e3115c
15 changed files with 38 additions and 45 deletions
|
|
@ -368,8 +368,7 @@ def raises_oserror(*a):
|
|||
with support.swap_attr(platform, '_wmi_query', raises_oserror):
|
||||
with os_helper.EnvironmentVarGuard() as environ:
|
||||
try:
|
||||
if 'PROCESSOR_ARCHITEW6432' in environ:
|
||||
del environ['PROCESSOR_ARCHITEW6432']
|
||||
del environ['PROCESSOR_ARCHITEW6432']
|
||||
environ['PROCESSOR_ARCHITECTURE'] = 'foo'
|
||||
platform._uname_cache = None
|
||||
system, node, release, version, machine, processor = platform.uname()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue