fix: subscriptions
authorThomasV <thomasv@gitorious>
Sun, 28 Oct 2012 09:22:12 +0000 (10:22 +0100)
committerThomasV <thomasv@gitorious>
Sun, 28 Oct 2012 09:22:12 +0000 (10:22 +0100)
lib/interface.py

index 4c792b5..354db2f 100644 (file)
@@ -422,7 +422,9 @@ class Interface(threading.Thread):
             with self.lock:
                 if self.subscriptions.get(channel) is None: 
                     self.subscriptions[channel] = []
-                self.subscriptions[channel] += sub
+                for message in sub:
+                    if message not in self.subscriptions[channel]:
+                        self.subscriptions[channel].append(message)
 
         if self.protocol in 'st':
             with self.lock: