Changeset 454:7c045cdd9fdc
- Timestamp:
- 08/01/08 16:29:01
(5 months ago)
- Author:
- "Brian Warner <warner@lothar.com>"
- branch:
- default
- Message:
incident-gatherer: rename addClassifier to add_classifier
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r453 |
r454 |
|
| 9 | 9 | instead of trying to sanitize the tubid we receive, since we |
|---|
| 10 | 10 | use it as a directory name |
|---|
| | 11 | (IncidentGathererService.add_classifier): rename addClassifier to |
|---|
| | 12 | add_classifier, I'm more fond of the latter form these days. Also |
|---|
| | 13 | remove a pyflakes warning. |
|---|
| 11 | 14 | |
|---|
| 12 | 15 | * foolscap/test/test_logging.py (IncidentGatherer.test_emit): add |
|---|
| r453 |
r454 |
|
| 13 | 13 | from foolscap.logging.interfaces import RILogGatherer, RILogObserver |
|---|
| 14 | 14 | from foolscap.util import get_local_ip_for |
|---|
| 15 | | from foolscap import base32 |
|---|
| 16 | 15 | |
|---|
| 17 | 16 | class BadTubID(Exception): |
|---|
| … | … | |
| 399 | 398 | self.stdout = stdout |
|---|
| 400 | 399 | |
|---|
| 401 | | def addClassifier(self, f): |
|---|
| | 400 | def add_classifier(self, f): |
|---|
| 402 | 401 | self.classifiers.append(f) |
|---|
| 403 | 402 | |
|---|
| … | … | |
| 493 | 492 | gs = gatherer.IncidentGathererService() |
|---|
| 494 | 493 | |
|---|
| 495 | | # To add a classifier function, call gs.addClassifier(f) like this: |
|---|
| | 494 | # To add a classifier function, call gs.add_classifier(f) like this: |
|---|
| 496 | 495 | # |
|---|
| 497 | 496 | #import re |
|---|
| 498 | 497 | #TUBCON_RE = re.compile(r'^Tub.connectorFinished: WEIRD, <foolscap.negotiate.TubConnector instance at \w+> is not in \[') |
|---|
| 499 | | #def is_foolscap(nodeis_s, incident): |
|---|
| | 498 | #def is_foolscap(nodeid_s, incident): |
|---|
| 500 | 499 | # (header, events) = incident |
|---|
| 501 | 500 | # trigger = header['trigger'] |
|---|
| … | … | |
| 503 | 502 | # if TUBCON_RE.search(m): |
|---|
| 504 | 503 | # return 'foolscap-tubconnector' |
|---|
| 505 | | #gs.addClassifier(is_foolscap) |
|---|
| | 504 | #gs.add_classifier(is_foolscap) |
|---|
| 506 | 505 | |
|---|
| 507 | 506 | application = service.Application('incident_gatherer') |
|---|