mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-28 15:27:11 -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()
|
sys.exit()
|
||||||
|
|
||||||
# Start the Onion object
|
# Start the Onion object
|
||||||
onion = Onion()
|
onion = Onion(debug)
|
||||||
try:
|
try:
|
||||||
onion.connect()
|
onion.connect()
|
||||||
except (TorTooOld, TorErrorInvalidSetting, TorErrorAutomatic, TorErrorSocketPort, TorErrorSocketFile, TorErrorMissingPassword, TorErrorUnreadableCookieFile, TorErrorAuthError, TorErrorProtocolError, BundledTorNotSupported, BundledTorTimeout) as e:
|
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
|
call this function and pass in a status string while connecting to tor. This
|
||||||
is necessary for status updates to reach the GUI.
|
is necessary for status updates to reach the GUI.
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self, debug):
|
||||||
|
self.debug = debug
|
||||||
|
|
||||||
self.stealth = False
|
self.stealth = False
|
||||||
self.service_id = None
|
self.service_id = None
|
||||||
|
|
||||||
|
@ -87,14 +87,14 @@ def main():
|
|||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
# Start the Onion
|
# Start the Onion
|
||||||
onion = Onion()
|
onion = Onion(debug)
|
||||||
|
|
||||||
# Start the OnionShare app
|
# Start the OnionShare app
|
||||||
web.set_stay_open(stay_open)
|
web.set_stay_open(stay_open)
|
||||||
app = OnionShare(onion, debug, local_only, stay_open)
|
app = OnionShare(onion, debug, local_only, stay_open)
|
||||||
|
|
||||||
# Launch the gui
|
# Launch the gui
|
||||||
gui = OnionShareGui(onion, qtapp, app, filenames)
|
gui = OnionShareGui(onion, debug, qtapp, app, filenames)
|
||||||
|
|
||||||
# Clean up when app quits
|
# Clean up when app quits
|
||||||
def shutdown():
|
def shutdown():
|
||||||
|
@ -44,9 +44,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
starting_server_step3 = QtCore.pyqtSignal()
|
starting_server_step3 = QtCore.pyqtSignal()
|
||||||
starting_server_error = QtCore.pyqtSignal(str)
|
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__()
|
super(OnionShareGui, self).__init__()
|
||||||
self.onion = onion
|
self.onion = onion
|
||||||
|
self.debug = debug
|
||||||
self.qtapp = qtapp
|
self.qtapp = qtapp
|
||||||
self.app = app
|
self.app = app
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user