Commit dfd8fd84 authored by Jim Fulton's avatar Jim Fulton

Added some defensive programming to get around weird ZODB 2 transaction

meta-data.
parent 29c5dc6e
......@@ -110,8 +110,17 @@ class FS:
self.tpc_finish()
return
if newtrans:
if not first: self.tpc_finish()
self.tpc_begin(tname, user, t)
try: string.atof(tname)
except:
# Ugh, we have a weird tname. We'll just ignore the transaction
# boundary and merge transactions
if first:
# But we can't ignore the first one, so we'll hack in a
# bogus start date
self.tpc_begin('100', user, t)
else:
if not first: self.tpc_finish()
self.tpc_begin(tname, user, t)
self.store(oid, p)
def store(self, oid, data):
......@@ -211,12 +220,16 @@ def cp(f1, f2, l):
class Ghost: pass
class Global:
__safe_for_unpickling__=1
def __init__(self, m, n):
self._module, self._name = m, n
def __call__(self, *args):
return Inst(self, args)
__basicnew__=__call__
def _global(m, n):
if m[:8]=='BoboPOS.':
if m=='BoboPOS.PickleDictionary' and n=='Root':
......
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