Use supported raise from

This commit is contained in:
Aviv Palivoda committed 2019-05-08 16:47:49 +03:00
1 parent 216f69e635
commit f5653cbc68
1 file changed
+2 -4
+2 -4
View File
@@ -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