(self, pattern)
| 48 | self.obj[self.obj.index(line)]["keyword"] = self._prepare_pattern(line["keyword"][0]) |
| 49 | |
| 50 | def _prepare_pattern(self, pattern): |
| 51 | regex, _, rest = pattern.partition('\\;') |
| 52 | try: |
| 53 | return re.compile(regex, re.I) |
| 54 | except re.error as e: |
| 55 | return re.compile(r'(?!x)x') |
| 56 | |
| 57 | def _has_app(self): |
| 58 | cms = [] |