From 95334a5d1e224548d16b358c1314be444625b925 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 8 Aug 2004 00:54:21 +0000 Subject: Purged Berkeley code of references to the long-obsolete whrandom. --- Lib/bsddb/dbtables.py | 6 +++--- Lib/bsddb/test/test_lock.py | 1 - Lib/bsddb/test/test_thread.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Lib/bsddb/dbtables.py b/Lib/bsddb/dbtables.py index e1d2c43..fd33b6e 100644 --- a/Lib/bsddb/dbtables.py +++ b/Lib/bsddb/dbtables.py @@ -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 diff --git a/Lib/bsddb/test/test_lock.py b/Lib/bsddb/test/test_lock.py index 4a5adc4..7d77798 100644 --- a/Lib/bsddb/test/test_lock.py +++ b/Lib/bsddb/test/test_lock.py @@ -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 diff --git a/Lib/bsddb/test/test_thread.py b/Lib/bsddb/test/test_thread.py index 59af027..44e3e9c 100644 --- a/Lib/bsddb/test/test_thread.py +++ b/Lib/bsddb/test/test_thread.py @@ -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 -- cgit v0.12