File: classify_foolscap.py

package info (click to toggle)
foolscap 24.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,444 kB
  • sloc: python: 21,994; sh: 58; makefile: 52
file content (11 lines) | stat: -rwxr-xr-x 373 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11

# this is a plugin for "flogtool classify-incident" or the Incident Gatherer

import re

TUBCON_RE = re.compile(r'^Tub.connectorFinished: WEIRD, <foolscap.negotiate.TubConnector (instance|object) at [\w ]+> is not in \[')
def classify_incident(trigger):
    m = trigger.get('message', '')
    if TUBCON_RE.search(m):
        return 'foolscap-tubconnector'
    return None