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.
pull/613/head
Alexandre Dulaunoy 2023-04-02 10:11:24 +02:00
parent 5aa47e7aeb
commit 113a112001
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 3 additions and 0 deletions

View File

@ -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