mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 07:51:27 +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.
|
# SOFTWARE.
|
||||||
import re
|
import re
|
||||||
import dns
|
import dns
|
||||||
|
from dns.exception import DNSException
|
||||||
import json
|
import json
|
||||||
import traceback
|
import traceback
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from . import bitcoin
|
from . import bitcoin
|
||||||
from . import dnssec
|
from . import dnssec
|
||||||
from .util import export_meta, import_meta
|
from .util import export_meta, import_meta, print_error
|
||||||
|
|
||||||
|
|
||||||
class Contacts(dict):
|
class Contacts(dict):
|
||||||
|
@ -96,7 +97,11 @@ class Contacts(dict):
|
||||||
def resolve_openalias(self, url):
|
def resolve_openalias(self, url):
|
||||||
# support email-style addresses, per the OA standard
|
# support email-style addresses, per the OA standard
|
||||||
url = url.replace('@', '.')
|
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'
|
prefix = 'btc'
|
||||||
for record in records:
|
for record in records:
|
||||||
string = record.strings[0]
|
string = record.strings[0]
|
||||||
|
|
Loading…
Add table
Reference in a new issue