From jeremy at digicool.com Fri Jun 1 12:59:04 2001 From: jeremy at digicool.com (jeremy@digicool.com) Date: Sun Aug 10 16:31:16 2008 Subject: [ZEO-Checkins] CVS: Packages/ZEO - start.py:1.24 Message-ID: <20010601165904.DFD3A510E3@korak.digicool.com> Update of /cvs-repository/Packages/ZEO In directory korak.digicool.com:/tmp/cvs-serv26488 Modified Files: start.py Log Message: Print a traceback to stderr in addition to logging when start fails --- Updated File start.py in package Packages/ZEO -- --- start.py 2001/04/07 17:46:45 1.23 +++ start.py 2001/06/01 16:59:04 1.24 @@ -319,10 +319,10 @@ zLOG.LOG("z2", zLOG.PANIC, "Startup exception", error=info) except: - info2=sys.exc_info() - import traceback - apply(traceback.print_exception, info) - apply(traceback.print_exception, info2) + pass + + import traceback + apply(traceback.print_exception, info) sys.exit(0) --- Updated File start.py in package Packages/ZEO -- --- start.py 2001/04/07 17:46:45 1.23 +++ start.py 2001/06/01 16:59:04 1.24 @@ -319,10 +319,10 @@ zLOG.LOG("z2", zLOG.PANIC, "Startup exception", error=info) except: - info2=sys.exc_info() - import traceback - apply(traceback.print_exception, info) - apply(traceback.print_exception, info2) + pass + + import traceback + apply(traceback.print_exception, info) sys.exit(0) From jeremy at digicool.com Fri Jun 1 13:03:29 2001 From: jeremy at digicool.com (jeremy@digicool.com) Date: Sun Aug 10 16:31:16 2008 Subject: [ZEO-Checkins] CVS: Packages/ZEO - testZEO.py:1.9 Message-ID: <20010601170329.33CE9510E3@korak.digicool.com> Update of /cvs-repository/Packages/ZEO/tests In directory korak.digicool.com:/tmp/cvs-serv26532 Modified Files: testZEO.py Log Message: Fix checkReconnection(). If an exception is raised, make sure the current transaction is aborted. And catch more of the oddball exceptions that can get raised when a server disconnects -- like thread.error. --- Updated File testZEO.py in package Packages/ZEO -- --- testZEO.py 2001/05/31 02:58:23 1.8 +++ testZEO.py 2001/06/01 17:03:28 1.9 @@ -12,6 +12,7 @@ import ZEO.ClientStorage, ZEO.StorageServer import ThreadedAsync, ZEO.trigger from ZODB.FileStorage import FileStorage +import thread from ZEO.tests import forker, Cache from ZEO.smac import Disconnected @@ -277,7 +278,8 @@ while 1: try: revid1 = self._dostore(oid, data=obj) - except ClientDisconnected: + except (ClientDisconnected, thread.error), err: + get_transaction().abort() time.sleep(0.1) else: break --- Updated File testZEO.py in package Packages/ZEO -- --- testZEO.py 2001/05/31 02:58:23 1.8 +++ testZEO.py 2001/06/01 17:03:28 1.9 @@ -12,6 +12,7 @@ import ZEO.ClientStorage, ZEO.StorageServer import ThreadedAsync, ZEO.trigger from ZODB.FileStorage import FileStorage +import thread from ZEO.tests import forker, Cache from ZEO.smac import Disconnected @@ -277,7 +278,8 @@ while 1: try: revid1 = self._dostore(oid, data=obj) - except ClientDisconnected: + except (ClientDisconnected, thread.error), err: + get_transaction().abort() time.sleep(0.1) else: break