summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2011-08-28 02:19:29 +0200
committerjvoisin2011-08-28 02:19:29 +0200
commitd6492597386cfa4b019d58f26d11e83934802355 (patch)
treea6f598e6b7fd404b9ffdef95715d3d8d863e79fc
parent4630eabd1840ad3c4825c1908e1bd334f441d466 (diff)
Fix for del editor['parent/field'] syntax (Victor Stinner)
-rw-r--r--mat/hachoir_editor/fieldset.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mat/hachoir_editor/fieldset.py b/mat/hachoir_editor/fieldset.py
index cbc12f9..a74c8e2 100644
--- a/mat/hachoir_editor/fieldset.py
+++ b/mat/hachoir_editor/fieldset.py
@@ -256,6 +256,11 @@ class EditableFieldSet(object):
256 Remove a field from the field set. May raise an MissingField exception 256 Remove a field from the field set. May raise an MissingField exception
257 if the field has already been deleted. 257 if the field has already been deleted.
258 """ 258 """
259 parts = name.partition('/')
260 if parts[2]:
261 fieldset = self[parts[0]]
262 del fieldset[part[2]]
263 return
259 if name in self._deleted: 264 if name in self._deleted:
260 raise MissingField(self, name) 265 raise MissingField(self, name)
261 self._deleted.add(name) 266 self._deleted.add(name)