summaryrefslogtreecommitdiff
path: root/Lib/os.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 06616c64d8..87689cc269 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -673,7 +673,7 @@ class _Environ(MutableMapping):
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
- raise KeyError(key)
+ raise KeyError(key) from None
return self.decodevalue(value)
def __setitem__(self, key, value):
@@ -689,7 +689,7 @@ class _Environ(MutableMapping):
del self._data[encodedkey]
except KeyError:
# raise KeyError with the original key value
- raise KeyError(key)
+ raise KeyError(key) from None
def __iter__(self):
for key in self._data: