Changeset 454:7c045cdd9fdc

Show
Ignore:
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
  • ChangeLog

    r453 r454  
    99        instead of trying to sanitize the tubid we receive, since we 
    1010        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. 
    1114 
    1215        * foolscap/test/test_logging.py (IncidentGatherer.test_emit): add 
  • foolscap/logging/gatherer.py

    r453 r454  
    1313from foolscap.logging.interfaces import RILogGatherer, RILogObserver 
    1414from foolscap.util import get_local_ip_for 
    15 from foolscap import base32 
    1615 
    1716class BadTubID(Exception): 
     
    399398        self.stdout = stdout 
    400399 
    401     def addClassifier(self, f): 
     400    def add_classifier(self, f): 
    402401        self.classifiers.append(f) 
    403402 
     
    493492gs = gatherer.IncidentGathererService() 
    494493 
    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: 
    496495# 
    497496#import re 
    498497#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): 
    500499#    (header, events) = incident 
    501500#    trigger = header['trigger'] 
     
    503502#    if TUBCON_RE.search(m): 
    504503#        return 'foolscap-tubconnector' 
    505 #gs.addClassifier(is_foolscap) 
     504#gs.add_classifier(is_foolscap) 
    506505 
    507506application = service.Application('incident_gatherer')