Commit 08b7b2c2 authored by Jeremy Hylton's avatar Jeremy Hylton

Don't every load the root when using --nowrite, just use load().

parent 5e30713c
......@@ -46,17 +46,20 @@ def check_server(addr, storage, write):
# is called. The only thing we care about, though, is that
# registerDB() calls _startup().
db = ZODB.DB(cs)
cn = db.open()
root = cn.root()
if write:
db = ZODB.DB(cs)
cn = db.open()
root = cn.root()
try:
root['zeoup'] = root.get('zeoup', 0)+ 1
get_transaction().commit()
except ConflictError:
pass
cn.close()
db.close()
cn.close()
db.close()
else:
data, serial = cs.load("\0\0\0\0\0\0\0\0", "")
def usage(exit=1):
print __doc__
......
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