Commit 6569c1fc authored by Arnaud Fontaine's avatar Arnaud Fontaine

PortalTransforms: _unmapTransform(): Do not fail if there is nothing to actually unmap.

Calling manage_reloadAllTransforms was raising KeyError.
parent d49c859a
......@@ -319,11 +319,17 @@ class TransformTool(UniqueObject, ActionProviderBase, Folder):
for i in transform.inputs:
for mti in registry.lookup(i):
for mt in mti.mimetypes:
mt_in = self._mtmap.get(mt, {})
try:
mt_in = self._mtmap[mt]
except KeyError:
continue
output = transform.output
mto = registry.lookup(output)
for mt2 in mto[0].mimetypes:
try:
l = mt_in[mt2]
except KeyError:
continue
for i in range(len(l)):
if transform.name() == l[i].name():
l.pop(i)
......
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