Make network insensitive to absence of onionhostname config option

This commit is contained in:
Lee Miller 2022-04-21 01:40:38 +03:00
parent 8e05e4a178
commit 8fc42b758d
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
2 changed files with 1 additions and 3 deletions

View File

@ -241,8 +241,6 @@ def updateConfig():
* defaults.networkDefaultPayloadLengthExtraBytes)
)
if not config.has_option('bitmessagesettings', 'onionhostname'):
config.set('bitmessagesettings', 'onionhostname', '')
if not config.has_option('bitmessagesettings', 'onionport'):
config.set('bitmessagesettings', 'onionport', '8444')
if not config.has_option('bitmessagesettings', 'onionbindip'):

View File

@ -164,7 +164,7 @@ class BMConnectionPool(object):
def getListeningIP():
"""What IP are we supposed to be listening on?"""
if config.safeGet(
"bitmessagesettings", "onionhostname").endswith(".onion"):
"bitmessagesettings", "onionhostname", "").endswith(".onion"):
host = config.safeGet(
"bitmessagesettings", "onionbindip")
else: