mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Correction for 4f82b6cfee46.
This commit is contained in:
parent
ad34ef8640
commit
c41917f4cb
1 changed files with 6 additions and 1 deletions
|
@ -686,16 +686,21 @@ class _Environ(MutableMapping):
|
|||
self[key] = value
|
||||
return self[key]
|
||||
|
||||
# if putenv or unsetenv exist they should already be in __all__
|
||||
try:
|
||||
_putenv = putenv
|
||||
except NameError:
|
||||
_putenv = lambda key, value: None
|
||||
else:
|
||||
if "putenv" not in __all__:
|
||||
__all__.append("putenv")
|
||||
|
||||
try:
|
||||
_unsetenv = unsetenv
|
||||
except NameError:
|
||||
_unsetenv = lambda key: _putenv(key, "")
|
||||
else:
|
||||
if "unsetenv" not in __all__:
|
||||
__all__.append("unsetenv")
|
||||
|
||||
def _createenviron():
|
||||
if name == 'nt':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue