diff --git a/onionshare/__init__.py b/onionshare/__init__.py index 20054730..f859e10c 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 780a397d..194bdfd2 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 dcbe2aec..8168ffcc 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 0f3effd0..2b464e14 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