Kaydet (Commit) 784cd4cc authored tarafından Éric Araujo's avatar Éric Araujo

Make one function in packaging.metadata simpler

üst f3f283a1
......@@ -185,6 +185,7 @@ _MISSING = object()
_FILESAFE = re.compile('[^A-Za-z0-9.]+')
class Metadata:
"""The metadata of a release.
......@@ -228,10 +229,8 @@ class Metadata:
def __delitem__(self, name):
field_name = self._convert_name(name)
try:
del self._fields[field_name]
except KeyError:
raise KeyError(name)
# we let a KeyError propagate
del self._fields[field_name]
self._set_best_version()
def __contains__(self, name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment