[Pkg-privacy-commits] [onionshare] 39/55: Refactor onionshare CLI to use await_publication=True when using ephemeral onion services, instead of relying on wait_for_hs function
Ulrike Uhlig
u-guest at moszumanska.debian.org
Thu Sep 8 10:27:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch debian
in repository onionshare.
commit 360fb6cfccf76f4ddc821145fe4d93bcf4341259
Author: Micah Lee <micah at micahflee.com>
Date: Mon Sep 5 11:29:12 2016 -0700
Refactor onionshare CLI to use await_publication=True when using ephemeral onion services, instead of relying on wait_for_hs function
---
onionshare/onion.py | 4 ++--
onionshare/onionshare.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/onionshare/onion.py b/onionshare/onion.py
index 7ccf7b0..c015f5e 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -90,9 +90,9 @@ class Onion(object):
print(strings._("connecting_ctrlport").format(int(port)))
if self.supports_ephemeral:
print(strings._('using_ephemeral'))
- res = self.c.create_ephemeral_hidden_service({ 80: port }, await_publication = False)
+ res = self.c.create_ephemeral_hidden_service({ 80: port }, await_publication = True)
self.service_id = res.content()[0][2].split('=')[1]
- onion_host = res.content()[0][2].split('=')[1] + '.onion'
+ onion_host = self.service_id + '.onion'
return onion_host
else:
diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py
index 4190ddb..cd401f3 100644
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@ -158,14 +158,14 @@ def main(cwd=None):
print(strings._("large_filesize"))
print('')
- # start onionshare service in new thread
+ # start onionshare http service in new thread
t = threading.Thread(target=web.start, args=(app.port, app.stay_open, app.transparent_torification))
t.daemon = True
t.start()
try: # Trap Ctrl-C
# wait for hs, only if using old version of tor
- if not app.local_only:
+ if not app.local_only and not app.onion.supports_ephemeral:
ready = app.onion.wait_for_hs(app.onion_host)
if not ready:
sys.exit()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git
More information about the Pkg-privacy-commits
mailing list