moved doFind* to ConnectionRepository so they are available on AI

This commit is contained in:
Darren Ranalli 2003-09-06 03:24:18 +00:00
parent 078f4c50c5
commit 28e1196c5f
1 changed files with 14 additions and 0 deletions

View File

@ -317,3 +317,17 @@ class ConnectionRepository(DirectObject.DirectObject):
self.notify.info('*** RESTORING SIMULATED PULLED-NETWORK-PLUG ***')
self.tcpConn = self.hijackedTcpConn
del self.hijackedTcpConn
def doFind(self, str):
""" returns list of distributed objects with matching str in value """
for value in self.doId2do.values():
if `value`.find(str) >= 0:
return value
def doFindAll(self, str):
""" returns list of distributed objects with matching str in value """
matches = []
for value in self.doId2do.values():
if `value`.find(str) >= 0:
matches.append(value)
return matches