r229 - branches/rewrite/src

Otavio Salvador partial-mirror-devel@lists.alioth.debian.org
Tue, 21 Sep 2004 14:38:24 -0600


Author: otavio
Date: Tue Sep 21 14:38:23 2004
New Revision: 229

Modified:
   branches/rewrite/src/Download.py
Log:
Code clenup. I removed a lot of unneeded code.

Modified: branches/rewrite/src/Download.py
==============================================================================
--- branches/rewrite/src/Download.py	(original)
+++ branches/rewrite/src/Download.py	Tue Sep 21 14:38:23 2004
@@ -26,16 +26,9 @@
 
 class DownloadQueue(Queue):
     """ Implemente a Queue without duplicated items. """
-    def __init__(self, maxsize=0):
-        Queue.__init__(self, maxsize)
-        
-    def put(self, item, block=True, timeout=None):
+    def _put(self, item):
         if item not in self.queue:
-            Queue.put(self, item, block, timeout)
-
-    def put_nowait(self, item):
-        if item not in self.queue:
-            Queue.put_nowait(self, item)
+            self.queue.append(item)
 
 class Download:
     """ Download queue """