[Zope-Checkins] CVS: Packages/ZPublisher - HTTPRequest.py:1.65
Fred L. Drake, Jr.
fdrake@acm.org
Wed, 10 Apr 2002 23:01:05 -0400
Update of /cvs-repository/Packages/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv4922/ZPublisher
Modified Files:
HTTPRequest.py
Log Message:
Use the random module instead of the deprecated whrandom module.
whrandom triggers a DeprecationWarning when using CVS Python.
=== Packages/ZPublisher/HTTPRequest.py 1.64 => 1.65 ===
__version__='$Revision$'[11:-2]
-import re, sys, os, urllib, time, whrandom, cgi, codecs
+import re, sys, os, urllib, time, random, cgi, codecs
from BaseRequest import BaseRequest
from HTTPResponse import HTTPResponse
from cgi import FieldStorage, escape
@@ -114,7 +114,7 @@
retry_max_count=3
def supports_retry(self):
if self.retry_count < self.retry_max_count:
- time.sleep(whrandom.uniform(0, 2**(self.retry_count)))
+ time.sleep(random.uniform(0, 2**(self.retry_count)))
return 1
def retry(self):