changeset 21:331d96e6a133

Fixed NameError in the delete_queue method in the dummy backend. Thanks for the report, cleifer.
author mcroydon
date Fri, 30 Apr 2010 15:58:07 +0000
parents b4184f99ed13
children db368b4d5925
files queues/backends/dummy.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/queues/backends/dummy.py	Tue Oct 20 22:01:12 2009 +0000
+++ b/queues/backends/dummy.py	Fri Apr 30 15:58:07 2010 +0000
@@ -49,10 +49,8 @@
 def delete_queue(name):
     """Just start afresh."""
     try:
-        while True:
-            dummy_queue.get(block=False)
-    except queue.Empty:
-        # Yay, exhausted.
+        del queues[name]
+    except KeyError:
         pass