From: Jason Ish Date: Thu, 14 Apr 2022 15:54:30 +0000 (-0600) Subject: Don't fail when source removed from index. X-Git-Tag: 1.3.0rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5443a5481b61d136d0910839a4d84855b9800623;p=thirdparty%2Fsuricata-update.git Don't fail when source removed from index. Instead of failing when an enabled source is no longer in the index, log an error and continue onto the next source. Ticket 5269 --- diff --git a/suricata/update/main.py b/suricata/update/main.py index 2e0909c..98c876b 100644 --- a/suricata/update/main.py +++ b/suricata/update/main.py @@ -936,6 +936,9 @@ def load_sources(suricata_version): "Source index is required for source %s; " "run suricata-update update-sources" % (source["source"])) source_config = index.get_source_by_name(name) + if source_config is None: + logger.warn("Source no longer exists in index and will not be fetched: {}".format(name)) + continue try: checksum = source_config["checksum"] except: