From 02debefdbea919b189025f06318f8f26fd6b4fa4 Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Sun, 2 May 2021 16:20:25 +0200
Subject: [PATCH] [mod] #396: wot_tools: Handle 404 error not found exception

Remove useless ValueError exception
---
 silkaj/wot_tools.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/silkaj/wot_tools.py b/silkaj/wot_tools.py
index b74248ef..2c2d72d2 100644
--- a/silkaj/wot_tools.py
+++ b/silkaj/wot_tools.py
@@ -13,6 +13,8 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with Silkaj. If not, see <https://www.gnu.org/licenses/>.
 
+import urllib
+
 from duniterpy.api.bma import wot
 from duniterpy.api.errors import DuniterError
 
@@ -56,8 +58,8 @@ def wot_lookup(identifier):
         return results["results"]
     except DuniterError as e:
         message_exit(e.message)
-    except ValueError as e:
-        pass
+    except urllib.error.HTTPError as e:
+        message_exit(e)
 
 
 def identities_from_pubkeys(pubkeys, uids):
-- 
GitLab