From acd5ebfab52893fd6d5bf60b0f085d240ead21c7 Mon Sep 17 00:00:00 2001
From: Inso <insomniak.fr@gmail.com>
Date: Sat, 17 Oct 2015 13:52:56 +0200
Subject: [PATCH] Fix crash when changing community

---
 src/cutecoin/gui/wot_tab.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cutecoin/gui/wot_tab.py b/src/cutecoin/gui/wot_tab.py
index 3280ff29..0c4db6ac 100644
--- a/src/cutecoin/gui/wot_tab.py
+++ b/src/cutecoin/gui/wot_tab.py
@@ -81,8 +81,8 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
         if self.community:
             try:
                 self.community.network.new_block_mined.disconnect(self.refresh)
-            except ValueError as e:
-                if "disconnect" in str(e):
+            except TypeError as e:
+                if "connected" in str(e):
                     logging.debug("new block mined not connected")
         if self.app.preferences["auto_refresh"]:
             if new_community:
-- 
GitLab