if self.has_groups:
# if there are matches of some sort in this revision content, fill the lists for each cap_group
- if self.pattern.search(content) is not None:
+ if content is not None and self.pattern.search(content) is not None:
m = self.pattern.finditer(content)
matchobjects = list(m)
# there are no capture groups, we just search for all the matches of the regex
else:
#given that there are matches to be made
- if self.pattern.search(content) is not None:
+ if content is not None and self.pattern.search(content) is not None:
m = self.pattern.findall(content)
temp_dict[self.label] = ', '.join(m)
else: