seems like we need to purge 'filename' from both _model_data as well as xml_attributes

This commit is contained in:
Chris Dodge
2013-04-08 16:09:41 -04:00
parent a0f5a51135
commit 54afc5eb63

View File

@@ -24,6 +24,11 @@ def strip_filenames(descriptor):
"""
print "strip filename from {desc}".format(desc=descriptor.location.url())
descriptor._model_data.pop('filename', None)
if hasattr(descriptor, 'xml_attributes'):
if 'filename' in descriptor.xml_attributes:
del descriptor.xml_attributes['filename']
for d in descriptor.get_children():
strip_filenames(d)