fix: Crash if there are no ressources

pull/86/head
Raphaël Vinot 2020-08-27 16:15:07 +02:00
parent 9eb08beb3c
commit 611b2a8ff5
1 changed files with 2 additions and 0 deletions

View File

@ -194,6 +194,8 @@ class Context():
"""Return a dictionary of content resources found in the local known_content database, or in SaneJS (if enabled)"""
all_ressources_hashes = self._get_resources_hashes(har2tree_container)
# Get from local cache of known content all descriptions related to the ressources.
if not all_ressources_hashes:
return {}
known_content_table = dict(zip(all_ressources_hashes,
self.redis.hmget('known_content', all_ressources_hashes)))