extras-buildsys/common HTTPServer.py,1.4,1.5

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Mon Jul 11 03:42:09 UTC 2005


Author: dcbw

Update of /cvs/fedora/extras-buildsys/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21907/common

Modified Files:
	HTTPServer.py 
Log Message:
Python 2.2 fixups


Index: HTTPServer.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/common/HTTPServer.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HTTPServer.py	7 Jul 2005 19:10:14 -0000	1.4
+++ HTTPServer.py	11 Jul 2005 03:42:06 -0000	1.5
@@ -129,13 +129,18 @@
     print "Creating random test data..."
     f = open(os.path.join(srcdir, "testfile.dat"), "w")
     x = 1
+    import random
     while x < 10000:
-        f.write(os.urandom(50))
+        try:
+            f.write(os.urandom(50))
+        except AttributeError:
+            s = str(random.randint(0, 255))
+            f.write(s)
         x = x + 1
     f.close()
 
     print "Starting the server."
-    server = PlgHTTPServer(('localhost', 8886), srcdir, certs)
+    server = PlgHTTPServerManager(('localhost', 8886), srcdir, certs)
     server.start()
 
     while True:




More information about the fedora-extras-commits mailing list