]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Remove the obsolete whrandom module and use random instead.
authorCameron Dale <camrdale@gmail.com>
Sun, 9 Dec 2007 03:18:03 +0000 (19:18 -0800)
committerCameron Dale <camrdale@gmail.com>
Sun, 9 Dec 2007 03:18:03 +0000 (19:18 -0800)
khash.py
knet.py
test_khashmir.py

index f750deaf7126247dac716725da7ba89a61417bd5..8a5bc618e8c87bc7c58552963046993ba6595ea2 100644 (file)
--- a/khash.py
+++ b/khash.py
@@ -2,7 +2,7 @@
 # see LICENSE.txt for license information
 
 from sha import sha
 # 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:
 
 #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):
     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):
         return s
 
 def intify(hstr):
diff --git a/knet.py b/knet.py
index 4067f84ad73f0b8a5d2e4edb85fd67af23c2be0b..e974a795a01cf26f93abb094473a2cb63ba4678b 100644 (file)
--- a/knet.py
+++ b/knet.py
@@ -5,7 +5,7 @@
 
 from khashmir import Khashmir
 from twisted.internet import reactor
 
 from khashmir import Khashmir
 from twisted.internet import reactor
-from whrandom import randrange
+from random import randrange
 import sys, os
 
 class Network:
 import sys, os
 
 class Network:
index 3f4908f7c49b24d2c88be22f633cb14da0845a17..e9c426ad7fd5cd5586feefbd36d4d93dc9e3ee90 100644 (file)
@@ -3,7 +3,7 @@ from khashmir import *
 import khash
 from copy import copy
 
 import khash
 from copy import copy
 
-from whrandom import randrange
+from random import randrange
 
 import os
 
 
 import os