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