correct onionr.py open port function call

This commit is contained in:
Kevin Froman 2019-07-14 02:05:25 -05:00
parent c92689ef20
commit 650d5077ed

View File

@ -118,10 +118,10 @@ class Onionr:
if type(config.get('client.webpassword')) is type(None): if type(config.get('client.webpassword')) is type(None):
config.set('client.webpassword', base64.b16encode(os.urandom(32)).decode('utf-8'), savefile=True) config.set('client.webpassword', base64.b16encode(os.urandom(32)).decode('utf-8'), savefile=True)
if type(config.get('client.client.port')) is type(None): if type(config.get('client.client.port')) is type(None):
randomPort = netcontroller.getOpenPort() randomPort = netcontroller.get_open_port()
config.set('client.client.port', randomPort, savefile=True) config.set('client.client.port', randomPort, savefile=True)
if type(config.get('client.public.port')) is type(None): if type(config.get('client.public.port')) is type(None):
randomPort = netcontroller.getOpenPort() randomPort = netcontroller.get_open_port()
config.set('client.public.port', randomPort, savefile=True) config.set('client.public.port', randomPort, savefile=True)
if type(config.get('client.api_version')) is type(None): if type(config.get('client.api_version')) is type(None):
config.set('client.api_version', API_VERSION, savefile=True) config.set('client.api_version', API_VERSION, savefile=True)