mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
fix #4032
This commit is contained in:
parent
efd92aba67
commit
f90c0d73db
1 changed files with 7 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue