[Pkg-anonymity-tools] [onionshare] 04/57: Fix CLI to exit when server is shutdown

Ulrike Uhlig u-guest at moszumanska.debian.org
Tue May 19 18:18:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to annotated tag 0.7
in repository onionshare.

commit f2cd447a58fccef72f7e37f2ac37c218808ea234
Author: kkka <kkka at users.noreply.github.com>
Date:   Sun Oct 5 02:42:27 2014 +0900

    Fix CLI to exit when server is shutdown
---
 onionshare/onionshare.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py
index 5c0acde..3fa13ad 100644
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@ -261,8 +261,9 @@ def main():
 
     # wait for app to close
     try:
-        while True:
-            time.sleep(0.5)
+        while t.is_alive():
+            # t.join() can't catch KeyboradInterrupt in such as Ubuntu
+            t.join(0.5)
     except KeyboardInterrupt:
         web.stop(app.port)
     finally:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/onionshare.git



More information about the Pkg-anonymity-tools mailing list