tfix #4032 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f90c0d73dbd0b20804a4aaffcddb9a65aa78686e DIR parent efd92aba67081cb0e6807912cc2a385f17d93b96 HTML Author: SomberNight <somber.night@protonmail.com> Date: Tue, 6 Mar 2018 16:07:33 +0100 fix #4032 Diffstat: M lib/contacts.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/contacts.py b/lib/contacts.py t@@ -22,13 +22,14 @@ # SOFTWARE. import re import dns +from dns.exception import DNSException import json import traceback import sys from . import bitcoin from . import dnssec -from .util import export_meta, import_meta +from .util import export_meta, import_meta, print_error class Contacts(dict): t@@ -96,7 +97,11 @@ class Contacts(dict): def resolve_openalias(self, url): # support email-style addresses, per the OA standard url = url.replace('@', '.') - records, validated = dnssec.query(url, dns.rdatatype.TXT) + try: + records, validated = dnssec.query(url, dns.rdatatype.TXT) + except DNSException as e: + print_error('Error resolving openalias: ', str(e)) + return None prefix = 'btc' for record in records: string = record.strings[0]