From af776539b1bb50f67a4e6082f5d626ac285f8ccc Mon Sep 17 00:00:00 2001 From: Difrex Date: Wed, 5 Oct 2016 13:14:12 +0300 Subject: [PATCH] more informative error log --- surok/discovery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/surok/discovery.py b/surok/discovery.py index e60d873..5b8322a 100644 --- a/surok/discovery.py +++ b/surok/discovery.py @@ -82,9 +82,9 @@ def do_query(fqdn, loglevel): info = str(rdata).split() server = {'name': info[3][:-1], 'port': info[2]} servers.append(server) - except DNSException: + except DNSException as e: if loglevel != 'info': - logging.error("Could not resolve " + fqdn) + logging.error("Could not resolve " + fqdn + ': ' + str(e)) return {"state": 404} return servers