Commit 3fd738f7 authored by Barry Warsaw's avatar Barry Warsaw

_fmt_oid(): Handle oid == None, which is raised by

FileStorage._txn_undo()
parent dc3b3551
...@@ -13,13 +13,15 @@ ...@@ -13,13 +13,15 @@
############################################################################## ##############################################################################
"""ZODB-defined exceptions """ZODB-defined exceptions
$Id: POSException.py,v 1.15 2002/12/03 18:36:29 jeremy Exp $""" $Id: POSException.py,v 1.16 2002/12/09 19:39:45 bwarsaw Exp $"""
from types import StringType, DictType from types import StringType, DictType
import ZODB.utils import ZODB.utils
def _fmt_oid(oid): 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): def _fmt_undo(oid, reason):
s = reason and (": %s" % reason) or "" s = reason and (": %s" % reason) or ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment