Remove extra space from onion url

This commit is contained in:
Taylor Helsper 2020-03-15 17:47:15 -05:00
parent 8769c5d778
commit 2a4f8c7e2d

View File

@ -474,7 +474,7 @@ def get_onion_url_general():
try:
if os.path.isfile("/var/lib/tor/mynode/hostname"):
with open("/var/lib/tor/mynode/hostname") as f:
return f.read()
return f.read().strip()
except:
pass
return "error"
@ -483,7 +483,7 @@ def get_onion_url_btc():
try:
if os.path.isfile("/var/lib/tor/mynode_btc/hostname"):
with open("/var/lib/tor/mynode_btc/hostname") as f:
return f.read()
return f.read().strip()
except:
pass
return "error"
@ -492,7 +492,7 @@ def get_onion_url_lnd():
try:
if os.path.isfile("/var/lib/tor/mynode_lnd/hostname"):
with open("/var/lib/tor/mynode_lnd/hostname") as f:
return f.read()
return f.read().strip()
except:
pass
return "error"
@ -501,7 +501,7 @@ def get_onion_url_electrs():
try:
if os.path.isfile("/var/lib/tor/mynode_electrs/hostname"):
with open("/var/lib/tor/mynode_electrs/hostname") as f:
return f.read()
return f.read().strip()
except:
pass
return "error"