Unsets the given environment variable if it is currently set. Note that we can not use os.environ.pop() or os.environ.clear() here since prior to Python 2.6 these functions did not remove the actual environment variable by calling os.unsetenv().
(name)
| 251 | |
| 252 | |
| 253 | def _env_del(name): |
| 254 | """ |
| 255 | Unsets the given environment variable if it is currently set. |
| 256 | |
| 257 | Note that we can not use os.environ.pop() or os.environ.clear() here |
| 258 | since prior to Python 2.6 these functions did not remove the actual |
| 259 | environment variable by calling os.unsetenv(). |
| 260 | |
| 261 | """ |
| 262 | try: |
| 263 | del os.environ[name] |
| 264 | except KeyError: |
| 265 | pass |
| 266 | |
| 267 | |
| 268 | def _env_set(name, value): |