Skip to content

Fix KeyError for SVG without xmlns tag

Romain requested to merge rmnvgr/mat2:fix-key-error-for-svg-without-xmlns into master

Some SVG optimizers remove the xmlns tag.

When retrieving metadata for SVG files, the parser wants to remove the Xmlns key from the dict if it is the valid value. However, it sets the default value of the get method to the valid value, so it will try to remove the key even if it doesn't exists, throwing an unhandled KeyError value.

This MR removes the default value of the get method so that the parser doesn't try to remove the Xmlns key with SVG files without the xmlns tag.

Merge request reports