From: Eric C. N. <eri...@us...> - 2002-02-21 13:11:44
|
Update of /cvsroot/recall/corba/src/Recall In directory usw-pr-cvs1:/tmp/cvs-serv31670/Recall Modified Files: ClientImpl.py Log Message: stop using name server, deal with fail object lookups Index: ClientImpl.py =================================================================== RCS file: /cvsroot/recall/corba/src/Recall/ClientImpl.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ClientImpl.py 13 Feb 2002 02:58:00 -0000 1.8 --- ClientImpl.py 21 Feb 2002 13:11:41 -0000 1.9 *************** *** 16,19 **** --- 16,21 ---- return names[1:] + [names[0]] + class NotFound(Exception): pass + import Recall__POA.idl class ClientImpl(Recall__POA.idl.Client): *************** *** 36,39 **** --- 38,43 ---- self._servers = _rotate(self._servers) obj = self._corba.find(self._servers[0]) + if not obj: + raise NotFound(self._servers[0] + " not found") self._server = CORBA.narrow(obj, idl.Echo) return self._server *************** *** 47,53 **** try: return self.attempt(name, args) ! except (CORBA.NotFound, CORBA.COMM_FAILURE, CORBA.UNKNOWN, CORBA.IMP_LIMIT, ! idl.NotMaster): pass self._server = None --- 51,57 ---- try: return self.attempt(name, args) ! except (CORBA.NotFound, CORBA.OBJECT_NOT_EXIST, CORBA.COMM_FAILURE, CORBA.UNKNOWN, CORBA.IMP_LIMIT, ! idl.NotMaster, NotFound): pass self._server = None *************** *** 70,76 **** for r in results: assert(r == results[0]) ! except (CORBA.NotFound, CORBA.COMM_FAILURE, CORBA.UNKNOWN, CORBA.IMP_LIMIT, ! idl.NotMaster): pass retry = 1 --- 74,80 ---- for r in results: assert(r == results[0]) ! except (CORBA.NotFound, CORBA.OBJECT_NOT_EXIST, CORBA.COMM_FAILURE, CORBA.UNKNOWN, CORBA.IMP_LIMIT, ! idl.NotMaster, NotFound): pass retry = 1 |