diff --git a/util/dns.py b/util/dns.py index 6a96752..db67c0a 100644 --- a/util/dns.py +++ b/util/dns.py @@ -134,9 +134,11 @@ def ping(qname, server, dst_port, rdtype, timeout, count, proto, src_ip, use_edn break except dns.exception.Timeout: break - except OSError: + except OSError as e: if socket_ttl: # this is an acceptable error while doing traceroute break + print("error: %s"% e.strerror, file=sys.stderr, flush=True) + raise OSError(e) except Exception as e: print("error: %s"% e, file=sys.stderr, flush=True) break