dhunter/core/filter.py
def _append_regexp(self, to: List[str], regexps: List[str] or None):
        """Appends new regexp rules to existing blacklists."""
        if regexps:
            try:
                for pattern in regexps:
                    re.compile(pattern)
                    if pattern not in to:
                        to.append(pattern)
            except re.error:
                from .log import Log
                # noinspection PyUnboundLocalVariable
                Log.abort('Invalid pattern: {}'.format(pattern))
Appends new regexp rules to existing blacklists.
Appends new regexp rules to existing blacklists.
Appends new regexp rules to existing blacklists .
def _append_regexp(self, to: List[str], regexps: List[str] or None):
        if regexps:
            try:
                for pattern in regexps:
                    re.compile(pattern)
                    if pattern not in to:
                        to.append(pattern)
            except re.error:
                from .log import Log
                Log.abort('Invalid pattern: {}'.format(pattern))
def _append_regexp ( self , to : List [ str ] , regexps : List [ str ] or None ) : if regexps : try : for pattern in regexps : re . compile ( pattern ) if pattern not in to : to . append ( pattern ) except re . error : from . log import Log Log . abort ( 'Invalid pattern: {}' . format ( pattern ) )
Appends new regexp rules to existing blacklists.
Appends new regexp rules to existing blacklists .
"""Appends new regexp rules to existing blacklists.""" # noinspection PyUnboundLocalVariable
self
to
List[str]
regexps
List[str] or None