Catch when SocksPort is empty.

This commit is contained in:
traumschule 2019-01-03 21:37:22 -05:00
parent 215003d8dc
commit 7772796770
1 changed files with 4 additions and 1 deletions

View File

@ -371,7 +371,10 @@ def main(args=[]):
# TODO implement authentication token / cookie
controller = Controller.from_port(port = options.a_controlport)
controller.authenticate()
STATUS['socksport'] = controller.get_conf('SocksPort').split(" ",1)[0]
if controller.get_conf('SocksPort'):
STATUS['socksport'] = controller.get_conf('SocksPort').split(" ",1)[0]
else:
STATUS['socksport'] = 9050
controller.close()
config = cp.ConfigParser()