From 2852f1c4e2cc9afb3723ff04f4586e35281420fc Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Sat, 8 Dec 2007 19:18:03 -0800 Subject: [PATCH] Remove the obsolete whrandom module and use random instead. --- khash.py | 4 ++-- knet.py | 2 +- test_khashmir.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/khash.py b/khash.py index f750dea..8a5bc61 100644 --- a/khash.py +++ b/khash.py @@ -2,7 +2,7 @@ # see LICENSE.txt for license information from sha import sha -import whrandom +import random #this is ugly, hopefully os.entropy will be in 2.4 try: @@ -11,7 +11,7 @@ except ImportError: def entropy(n): s = '' for i in range(n): - s += chr(whrandom.randint(0,255)) + s += chr(random.randint(0,255)) return s def intify(hstr): diff --git a/knet.py b/knet.py index 4067f84..e974a79 100644 --- a/knet.py +++ b/knet.py @@ -5,7 +5,7 @@ from khashmir import Khashmir from twisted.internet import reactor -from whrandom import randrange +from random import randrange import sys, os class Network: diff --git a/test_khashmir.py b/test_khashmir.py index 3f4908f..e9c426a 100644 --- a/test_khashmir.py +++ b/test_khashmir.py @@ -3,7 +3,7 @@ from khashmir import * import khash from copy import copy -from whrandom import randrange +from random import randrange import os -- 2.39.5