pvl/syslog/filter.py
changeset 209 cf883e2e1bff
parent 99 8d60eb5604e4
child 216 c0dbd44bd463
equal deleted inserted replaced
208:7f4f73e21201 209:cf883e2e1bff
    42         """
    42         """
    43 
    43 
    44         if prog :
    44         if prog :
    45             # normalize
    45             # normalize
    46             prog = prog.strip().lower()
    46             prog = prog.strip().lower()
    47             _, prog = os.path.split(prog)
    47     
       
    48             if prog.startswith('/') :
       
    49                 # leaves postfix/* intact, but fixes /usr/bin/cron
       
    50                 _, prog = os.path.split(prog)
    48 
    51 
    49         # match
    52         # match
    50         return self.match_glob(attr, glob, prog)
    53         return self.match_glob(attr, glob, prog)
    51 
    54 
    52     REGEX_TYPE = type(re.compile(''))
    55     REGEX_TYPE = type(re.compile(''))