plonetransmogrifier

How to handle tracebacks when importing lots of content with Transmogrifier?


Sometimes it is convenient to "keep going" when importing lots of content, ignoring tracebacks and other failures that may occur with certain content.

Is there any generic mechanism in Transmogrifier to make this easier? The only approaches I can see are:

Neither of these appear particularly convenient or desirable, hence my question.


Solution

  • you only need to write one blueprint which will handle and ignore all "tracebacks" you might want. be sure to put it right after "source" blueprint and yield in try/except block.

    ...

    def __call__(self):
        for item in self.previous:
            try:
                yield item
        except Exception, e
            # here do with exception whatever you want
            pass