]> granicus.if.org Git - python/commitdiff
Purged Berkeley code of references to the long-obsolete whrandom.
authorTim Peters <tim.peters@gmail.com>
Sun, 8 Aug 2004 00:54:21 +0000 (00:54 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 8 Aug 2004 00:54:21 +0000 (00:54 +0000)
Lib/bsddb/dbtables.py
Lib/bsddb/test/test_lock.py
Lib/bsddb/test/test_thread.py

index e1d2c43884708b51437e52d47da555bbc505a02a..fd33b6e8fdd00e01eecb5c37e39f31dde3f2f562 100644 (file)
@@ -21,7 +21,7 @@ import re
 import sys
 import copy
 import xdrlib
-import whrandom
+import random
 from types import ListType, StringType
 import cPickle as pickle
 
@@ -354,8 +354,8 @@ class bsdTableDB :
             # (note: this code has <64 bits of randomness
             # but it's plenty for our database id needs!)
             p = xdrlib.Packer()
-            p.pack_int(int(whrandom.random()*2147483647))
-            p.pack_int(int(whrandom.random()*2147483647))
+            p.pack_int(int(random.random()*2147483647))
+            p.pack_int(int(random.random()*2147483647))
             newid = p.get_buffer()
 
             # Guarantee uniqueness by adding this key to the database
index 4a5adc47fa6c94d40e65000165885b7ec75cafa3..7d7779805d8a92caafd4059aa3f9afe0cce5e87e 100644 (file)
@@ -6,7 +6,6 @@ import sys, os, string
 import tempfile
 import time
 from pprint import pprint
-from whrandom import random
 
 try:
     from threading import Thread, currentThread
index 59af027b8aa4796211be3c84c7be7b40f2444555..44e3e9ca51d58d2a13dda562b59e2677ec2a5db0 100644 (file)
@@ -8,7 +8,7 @@ import errno
 import shutil
 import tempfile
 from pprint import pprint
-from whrandom import random
+from random import random
 
 try:
     True, False