mirror of https://github.com/python/cpython
The error message should contain the key as given, not normalized.
Backout of 2e047702df7f. Reported by Jeremy Kloth.
This commit is contained in:
parent
618b73035a
commit
acc0952ff8
|
@ -229,8 +229,10 @@ class Metadata:
|
|||
|
||||
def __delitem__(self, name):
|
||||
field_name = self._convert_name(name)
|
||||
# we let a KeyError propagate
|
||||
del self._fields[field_name]
|
||||
try:
|
||||
del self._fields[field_name]
|
||||
except KeyError:
|
||||
raise KeyError(name)
|
||||
self._set_best_version()
|
||||
|
||||
def __contains__(self, name):
|
||||
|
|
Loading…
Reference in New Issue