def process(self, matches): matches = [match.groupdict() for match in matches] if self.transform: try: return self.transform(matches) except Exception as ex: Logr.warn('Exception raised while transforming matches: %s', ex) return matches