Commit c73abc61 authored by Alexandre's avatar Alexandre
Browse files

Catch error on failing import

parent a69be136
......@@ -5,20 +5,6 @@
# <https://framagit.org/bortzmeyer/homer/> See author, documentation,
# etc, there, or in the README.md included with the distribution.
# http://pycurl.io/docs/latest
import pycurl
# http://www.dnspython.org/
import dns.message
# https://github.com/drkjam/netaddr/
import netaddr
# Octobre 2019: the Python GnuTLS bindings don't work with Python 3. So we use OpenSSL.
# https://www.pyopenssl.org/
# https://pyopenssl.readthedocs.io/
import OpenSSL
import io
import sys
import base64
......@@ -33,6 +19,25 @@ import hashlib
import base64
import signal
try:
# http://pycurl.io/docs/latest
import pycurl
# http://www.dnspython.org/
import dns.message
# https://github.com/drkjam/netaddr/
import netaddr
# Octobre 2019: the Python GnuTLS bindings don't work with Python 3. So we use OpenSSL.
# https://www.pyopenssl.org/
# https://pyopenssl.readthedocs.io/
import OpenSSL
except ImportError as e:
print("Error: missing module")
print(e)
sys.exit(1)
# Values that can be changed from the command line
dot = False # DoH by default
verbose = False
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment