Commit a1e81657 authored by Aurel's avatar Aurel

this try/except must only catch error from the getattr, not from

script execution
parent 414042ad
......@@ -86,12 +86,13 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin,
method_id = self.getTextContentSubstitutionMappingMethodId()
if method_id:
mapping = guarded_getattr(self, method_id)(**kw)
method = guarded_getattr(self, method_id)
except AttributeError:
LOG('TextDocument', WARNING, 'could not get the substitution'
' mapping method %s from %r, so the content will not be'
' substituted.' % (method_id, self.getRelativeUrl()))
return text
mapping = method(**kw)
is_str = isinstance(text, str)
if is_str:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment