[Zodb-checkins] CVS: ZODB3/Tools - update.py:1.1.2.4

Guido van Rossum guido@python.org
Wed, 18 Dec 2002 22:38:19 -0500


Update of /cvs-repository/ZODB3/Tools
In directory cvs.zope.org:/tmp/cvs-serv24262

Modified Files:
      Tag: ZODB3-fast-restart-branch
	update.py 
Log Message:
Fix off-by-one error in update().


=== ZODB3/Tools/update.py 1.1.2.3 => 1.1.2.4 ===
--- ZODB3/Tools/update.py:1.1.2.3	Tue Dec 17 17:15:21 2002
+++ ZODB3/Tools/update.py	Wed Dec 18 22:38:19 2002
@@ -16,7 +16,7 @@
 NEARLY_FULL = CACHE_SIZE * 0.45
 
 def update(objs):
-    i = random.randint(0, len(objs))
+    i = random.randint(0, len(objs)-1)
     obj = objs[i]
     size = 2 ** random.randint(1, 20)
     obj.value = "u" * size