From eabe4b84aec032336efb12f3154bdade537dfa17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Thu, 12 Dec 2024 01:28:09 +0100 Subject: [PATCH] massdns data import better error handling --- feed_dns.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/feed_dns.py b/feed_dns.py index 78951d1..45a4b9e 100755 --- a/feed_dns.py +++ b/feed_dns.py @@ -167,8 +167,13 @@ class MassDnsParser(Parser): ) self.register(record) self.prof.enter_step("parse_massdns") - except IndexError: + except KeyError: + # Unhandle record type continue + except IndexError as err: + # Aborted file + print(err) + break PARSERS = {