[Zope3-checkins] CVS: ZODB/src/ZODB - serialize.py:1.10
Jeremy Hylton
jeremy at zope.com
Mon Feb 23 11:05:33 EST 2004
Update of /cvs-repository/ZODB/src/ZODB
In directory cvs.zope.org:/tmp/cvs-serv11222
Modified Files:
serialize.py
Log Message:
Add logging for EOFError seen overnight (and occasionally before).
=== ZODB/src/ZODB/serialize.py 1.9 => 1.10 ===
--- ZODB/src/ZODB/serialize.py:1.9 Thu Feb 19 16:23:07 2004
+++ ZODB/src/ZODB/serialize.py Mon Feb 23 11:05:32 2004
@@ -84,6 +84,7 @@
import cPickle
import cStringIO
+import logging
from persistent import Persistent
from persistent.wref import WeakRefMarker, WeakRef
@@ -378,8 +379,13 @@
def getState(self, pickle):
unpickler = self._get_unpickler(pickle)
- unpickler.load() # skip the class metadata
- return unpickler.load()
+ try:
+ unpickler.load() # skip the class metadata
+ return unpickler.load()
+ except EOFError, msg:
+ log = logging.getLogger("zodb.serialize")
+ log.exception("Unpickling error: %r", pickle)
+ raise
def setGhostState(self, obj, pickle):
state = self.getState(pickle)
More information about the Zope3-Checkins
mailing list