electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit f90c0d73dbd0b20804a4aaffcddb9a65aa78686e
parent efd92aba67081cb0e6807912cc2a385f17d93b96
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue,  6 Mar 2018 16:07:33 +0100

fix #4032

Diffstat:
Mlib/contacts.py | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/contacts.py b/lib/contacts.py @@ -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): @@ -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]