From b2bc7941dc50f8db8112883d8bb86222e279b228 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Thu, 17 Jan 2013 17:07:10 -0500 Subject: [PATCH] queue: Use normal instance data in SimpleQueue Code like this is dangerous: class SimpleQueue(object): queues = set() because all instances will share the same 'queues' set object. We don't really need multiple instances, but neither is there a reason to break them. So do the normal Python thing instead. (imported from commit a56bb8414dd549cfd312c9565df198cf9d20f08a) --- zephyr/lib/queue.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/zephyr/lib/queue.py b/zephyr/lib/queue.py index 54ead058be..8ca5baa9c8 100644 --- a/zephyr/lib/queue.py +++ b/zephyr/lib/queue.py @@ -7,13 +7,11 @@ import simplejson # interface for external files to put things into queues and take them # out from bots without having to import pika code all over our codebase. class SimpleQueueClient(object): - connection = None - channel = None - queues = set() - _inited = False - def __init__(self): - pass + self.connection = None + self.channel = None + self.queues = set() + self._inited = False def initialize(self): # Initialize the connection