[Zodb-checkins] CVS: ZODB3/Tools - zeoup.py:1.9
Jeremy Hylton
jeremy@zope.com
Mon, 18 Nov 2002 16:20:53 -0500
Update of /cvs-repository/ZODB3/Tools
In directory cvs.zope.org:/tmp/cvs-serv8634
Modified Files:
zeoup.py
Log Message:
Don't every load the root when using --nowrite, just use load().
=== ZODB3/Tools/zeoup.py 1.8 => 1.9 ===
--- ZODB3/Tools/zeoup.py:1.8 Fri Oct 4 14:58:38 2002
+++ ZODB3/Tools/zeoup.py Mon Nov 18 16:20:53 2002
@@ -46,17 +46,20 @@
# 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__