mirror of
https://github.com/python/cpython.git
synced 2025-11-20 02:50:14 +00:00
Move restoration of the os.environ object into the context manager where it belongs
This commit is contained in:
parent
87c03b3108
commit
fd4903bf05
2 changed files with 1 additions and 1 deletions
|
|
@ -576,6 +576,7 @@ class EnvironmentVarGuard(UserDict.DictMixin):
|
|||
del self._environ[k]
|
||||
else:
|
||||
self._environ[k] = v
|
||||
os.environ = self._environ
|
||||
|
||||
|
||||
class DirsOnSysPath(object):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue