From 399680dff0993e5fe9e16cfb7f1818daa305fb5a Mon Sep 17 00:00:00 2001 From: Vincent Texier <vit@free.fr> Date: Sat, 27 Dec 2014 12:00:06 +0100 Subject: [PATCH] Fix bug in wot if public key is unknown --- src/cutecoin/gui/wot_tab.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cutecoin/gui/wot_tab.py b/src/cutecoin/gui/wot_tab.py index 50b4a448..1e9dd772 100644 --- a/src/cutecoin/gui/wot_tab.py +++ b/src/cutecoin/gui/wot_tab.py @@ -2,6 +2,7 @@ import time import datetime +import logging from PyQt5.QtWidgets import QWidget from ..gen_resources.wot_tab_uic import Ui_WotTabWidget @@ -47,12 +48,20 @@ class WotTabWidget(QWidget, Ui_WotTabWidget): :param public_key: Public key of the identity """ + try: + certifiers = self.community.request(bma.wot.CertifiersOf, {'search': public_key}) + except ValueError as e: + logging.debug('bma.wot.CertifiersOf request error : ' + str(e)) + return False + + # reset graph graph = dict() + #Â add wallet node node_status = (NODE_STATUS_HIGHLIGHTED and (public_key == self.account.pubkey)) or 0 node_status += NODE_STATUS_SELECTED - certifiers = self.community.request(bma.wot.CertifiersOf, {'search': public_key}) + # highlighted node (wallet) graph[public_key] = {'arcs': [], 'text': certifiers['uid'], 'tooltip': public_key, 'status': node_status} #Â add certifiers of uid -- GitLab