From 113a112001b987956394f172ccb5c11472dccf7e Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sun, 2 Apr 2023 10:11:24 +0200 Subject: [PATCH] fix: [dbl_spamhaus] if you want to run local test, the dns module expansion is taking over from the original dnspython3 library. The trick is just to get rid of the syspath to exclude the local directory until the proper library is loaded. --- misp_modules/modules/expansion/dbl_spamhaus.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misp_modules/modules/expansion/dbl_spamhaus.py b/misp_modules/modules/expansion/dbl_spamhaus.py index 0cccfaf..4ecdfb9 100644 --- a/misp_modules/modules/expansion/dbl_spamhaus.py +++ b/misp_modules/modules/expansion/dbl_spamhaus.py @@ -2,7 +2,10 @@ import json import sys try: + original_path = sys.path + sys.path = original_path[1:] import dns.resolver + sys.path = original_path resolver = dns.resolver.Resolver() resolver.timeout = 0.2 resolver.lifetime = 0.2