made --local-only work in GUI (#58)

This commit is contained in:
Micah Lee 2014-06-26 14:26:41 -04:00
parent 2b8be2781c
commit c74e259fb4

View file

@ -106,6 +106,8 @@ def main():
# try starting hidden service
onionshare_port = onionshare.choose_port()
local_host = "127.0.0.1:{0}".format(onionshare_port)
if not local_only:
try:
onion_host = onionshare.start_hidden_service(onionshare_port)
except onionshare.NoTor as e:
@ -122,7 +124,10 @@ def main():
webapp.onionshare = onionshare
webapp.onionshare_port = onionshare_port
webapp.filename = filename
if not local_only:
webapp.onion_host = onion_host
else:
webapp.onion_host = local_host
webapp.qtapp = app
webapp.clipboard = app.clipboard()