From aec6fe2632772d2f632b5cc288cbea60f35952eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 4 Mar 2021 18:21:36 +0100 Subject: [PATCH] fix: Make mypy happy --- website/web/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/website/web/__init__.py b/website/web/__init__.py index e0245eb1..1e51f478 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -573,9 +573,12 @@ def ressources(): capture_uuid, url_uuid, hostnode_uuid = i.get_hash_uuids(h) try: ressource = lookyloo.get_ressource(capture_uuid, url_uuid, h) - except lookyloo.exceptions.MissingUUID: - ressource = ['unknown', '', 'unknown'] - ressources.append((h, freq, domain_freq, context.get(h), capture_uuid, url_uuid, hostnode_uuid, ressource[0], ressource[2])) + except MissingUUID: + pass + if ressource: + ressources.append((h, freq, domain_freq, context.get(h), capture_uuid, url_uuid, hostnode_uuid, ressource[0], ressource[2])) + else: + ressources.append((h, freq, domain_freq, context.get(h), capture_uuid, url_uuid, hostnode_uuid, 'unknown', 'unknown')) return render_template('ressources.html', ressources=ressources)