Changeset 481:dce8d3797246

Show
Ignore:
Timestamp:
09/02/08 21:28:56 (4 months ago)
Author:
Brian Warner <warner@allmydata.com>
branch:
default
Message:

negotiate: add more information to the TubConnector? log message, to try to figure out #81

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ChangeLog

    r480 r481  
    112008-09-02  Brian Warner  <warner@lothar.com> 
     2 
     3        * foolscap/negotiate.py (TubConnector.__repr__): add more 
     4        information to the repr, to help track down #81. Made TubConnector 
     5        a new-style class in the process, to make upcalling easier. 
     6        (TubConnector.checkForIdle): improve the log message 
    27 
    38        * foolscap/pb.py (Tub._log_gatherer_connected): use callRemoteOnly 
  • foolscap/negotiate.py

    r469 r481  
    12541254 
    12551255 
    1256 class TubConnector
     1256class TubConnector(object)
    12571257    """I am used to make an outbound connection. I am given a target TubID 
    12581258    and a list of locationHints, and I try all of them until I establish a 
     
    13041304        self.pendingConnections = {} 
    13051305 
     1306    def __repr__(self): 
     1307        s = object.__repr__(self) 
     1308        s = s[:-1] 
     1309        s += " from %s to %s>" % (self.tub.tubID, self.target.getTubID()) 
     1310        return s 
    13061311 
    13071312    def log(self, *args, **kwargs): 
     
    14551460        # we have no more outstanding connections (either in progress or in 
    14561461        # negotiation), so this connector is finished. 
    1457         self.log("connectorFinished"
     1462        self.log("connectorFinished (%s)" % self
    14581463        self.tub.connectorFinished(self)