mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-26 14:36:03 -05:00
Pass debug into the Onion and OnionShareGUI objects
This commit is contained in:
parent
a9e822b222
commit
219c4351e1
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
@ -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():
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user