From 6a8c6cad65561ce034c8a3e83251d090ef01b64c Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Mon, 17 Oct 2011 20:13:08 +0300 Subject: now_listen. correct disconnecting from chat control --- now_listen/now_listen.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'now_listen') diff --git a/now_listen/now_listen.py b/now_listen/now_listen.py index d7c4b71..0a29427 100644 --- a/now_listen/now_listen.py +++ b/now_listen/now_listen.py @@ -95,6 +95,8 @@ class Base(object): self.chat_control.handlers[self.id_] = self.chat_control.msg_textview def disconnect_from_chat_control(self): + if self.id_ not in self.chat_control.handlers: + return if self.chat_control.handlers[self.id_].handler_is_connected(self.id_): self.chat_control.handlers[self.id_].disconnect(self.id_) del self.chat_control.handlers[self.id_] -- cgit v1.2.3