(self)
| 106 | |
| 107 | # Check if we have connection to peer |
| 108 | def findConnection(self): |
| 109 | if self.connection and self.connection.connected: # We have connection to peer |
| 110 | return self.connection |
| 111 | else: # Try to find from other sites connections |
| 112 | self.connection = self.site.connection_server.getConnection(self.ip, self.port, create=False, site=self.site) |
| 113 | if self.connection: |
| 114 | self.connection.sites += 1 |
| 115 | return self.connection |
| 116 | |
| 117 | def __str__(self): |
| 118 | return "Peer:%-12s" % self.ip |
nothing calls this directly
no test coverage detected