From f5653cbc6819eb00b4200eccbc6dd2ab0ddd0d1f Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Wed, 8 May 2019 16:47:49 +0300 Subject: [PATCH] Use supported raise from --- Lib/os.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Lib/os.py b/Lib/os.py index f1ff15b3c..c768946c5 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -33,8 +33,7 @@ class _Environ(MutableMapping): value = self._data[self.encodekey(key)] except KeyError: # raise KeyError with the original key value - # raise KeyError(key) from None - raise KeyError(key) + raise KeyError(key) from None return self.decodevalue(value) @@ -51,8 +50,7 @@ class _Environ(MutableMapping): del self._data[encodedkey] except KeyError: # raise KeyError with the original key value - # raise KeyError(key) from None - raise KeyError(key) + raise KeyError(key) from None def __iter__(self): # list() from dict object is an atomic operation