[Zope-Checkins] CVS: Zope/lib/python/ZODB - POSException.py:1.16

Barry Warsaw barry@wooz.org
Mon, 9 Dec 2002 14:39:45 -0500


Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv5166

Modified Files:
	POSException.py 
Log Message:
_fmt_oid(): Handle oid == None, which is raised by
FileStorage._txn_undo()


=== Zope/lib/python/ZODB/POSException.py 1.15 => 1.16 ===
--- Zope/lib/python/ZODB/POSException.py:1.15	Tue Dec  3 13:36:29 2002
+++ Zope/lib/python/ZODB/POSException.py	Mon Dec  9 14:39:45 2002
@@ -19,7 +19,9 @@
 import ZODB.utils
 
 def _fmt_oid(oid):
-    return "%016x" % ZODB.utils.u64(oid)
+    if oid:
+        return "%016x" % ZODB.utils.u64(oid)
+    return oid
 
 def _fmt_undo(oid, reason):
     s = reason and (": %s" % reason) or ""