[Pkg-anonymity-tools] [onionshare] 52/140: remove gui_mode from web app, because it is no longer useful
Ulrike Uhlig
u-guest at moszumanska.debian.org
Mon Sep 29 20:33:47 UTC 2014
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch master
in repository onionshare.
commit 0858366e311b9bb4e5dc370abe3cec707456a780
Author: Micah Lee <micah at micahflee.com>
Date: Fri Aug 29 16:06:13 2014 -0700
remove gui_mode from web app, because it is no longer useful
---
onionshare/web.py | 21 +++++----------------
onionshare_gui/onionshare_gui.py | 2 +-
2 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/onionshare/web.py b/onionshare/web.py
index 4a2cef0..c7363c5 100644
--- a/onionshare/web.py
+++ b/onionshare/web.py
@@ -64,15 +64,6 @@ def set_stay_open(new_stay_open):
def get_stay_open():
return stay_open
-gui_mode = False
-def set_gui_mode(new_gui_mode):
- global gui_mode
- gui_mode = new_gui_mode
-def get_gui_mode():
- return gui_mode
-
-
-
def debug_mode():
import logging
@@ -146,11 +137,10 @@ def download(slug_candidate):
# download is finished, close the server
if not stay_open:
- if not gui_mode:
- print strings._("closing_automatically")
- if shutdown_func is None:
- raise RuntimeError('Not running with the Werkzeug Server')
- shutdown_func()
+ print strings._("closing_automatically")
+ if shutdown_func is None:
+ raise RuntimeError('Not running with the Werkzeug Server')
+ shutdown_func()
r = Response(generate())
r.headers.add('Content-Length', zip_filesize)
@@ -182,9 +172,8 @@ def shutdown(shutdown_slug_candidate):
return ""
-def start(port, stay_open=False, gui_mode=False):
+def start(port, stay_open=False):
set_stay_open(stay_open)
- set_gui_mode(gui_mode)
app.run(port=port)
def stop():
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index 2f6373e..335b50f 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -96,7 +96,7 @@ class OnionShareGui(QtGui.QWidget):
return
# start onionshare service in new thread
- t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open, True))
+ t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open))
t.daemon = True
t.start()
--
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