[Pkg-privacy-commits] [onionshare] 173/256: Pass debug into the Onion and OnionShareGUI objects
Ulrike Uhlig
ulrike at moszumanska.debian.org
Fri May 26 12:53:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
ulrike pushed a commit to branch master
in repository onionshare.
commit 219c4351e19027d0704c0ea97a5c2907827521e4
Author: Micah Lee <micah at micahflee.com>
Date: Tue May 16 10:57:59 2017 -0700
Pass debug into the Onion and OnionShareGUI objects
---
onionshare/__init__.py | 2 +-
onionshare/onion.py | 4 +++-
onionshare_gui/__init__.py | 4 ++--
onionshare_gui/onionshare_gui.py | 3 ++-
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/onionshare/__init__.py b/onionshare/__init__.py
index 2005473..f859e10 100644
--- a/onionshare/__init__.py
+++ b/onionshare/__init__.py
@@ -66,7 +66,7 @@ def main(cwd=None):
sys.exit()
# Start the Onion object
- onion = Onion()
+ onion = Onion(debug)
try:
onion.connect()
except (TorTooOld, TorErrorInvalidSetting, TorErrorAutomatic, TorErrorSocketPort, TorErrorSocketFile, TorErrorMissingPassword, TorErrorUnreadableCookieFile, TorErrorAuthError, TorErrorProtocolError, BundledTorNotSupported, BundledTorTimeout) as e:
diff --git a/onionshare/onion.py b/onionshare/onion.py
index 780a397..194bdfd 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -119,7 +119,9 @@ class Onion(object):
call this function and pass in a status string while connecting to tor. This
is necessary for status updates to reach the GUI.
"""
- def __init__(self):
+ def __init__(self, debug):
+ self.debug = debug
+
self.stealth = False
self.service_id = None
diff --git a/onionshare_gui/__init__.py b/onionshare_gui/__init__.py
index dcbe2ae..8168ffc 100644
--- a/onionshare_gui/__init__.py
+++ b/onionshare_gui/__init__.py
@@ -87,14 +87,14 @@ def main():
sys.exit()
# Start the Onion
- onion = Onion()
+ onion = Onion(debug)
# Start the OnionShare app
web.set_stay_open(stay_open)
app = OnionShare(onion, debug, local_only, stay_open)
# Launch the gui
- gui = OnionShareGui(onion, qtapp, app, filenames)
+ gui = OnionShareGui(onion, debug, qtapp, app, filenames)
# Clean up when app quits
def shutdown():
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index 0f3effd..2b464e1 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -44,9 +44,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
starting_server_step3 = QtCore.pyqtSignal()
starting_server_error = QtCore.pyqtSignal(str)
- def __init__(self, onion, qtapp, app, filenames):
+ def __init__(self, onion, debug, qtapp, app, filenames):
super(OnionShareGui, self).__init__()
self.onion = onion
+ self.debug = debug
self.qtapp = qtapp
self.app = app
--
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