mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-09 18:05:05 -04:00
Catch Tor protocol error exceptions when starting an onion service (#344)
This commit is contained in:
parent
1c4574a7be
commit
677951c240
5 changed files with 23 additions and 11 deletions
|
@ -21,7 +21,7 @@ from PyQt5 import QtCore, QtWidgets, QtGui
|
|||
|
||||
from onionshare import strings
|
||||
from onionshare.settings import Settings
|
||||
from onionshare.onion import Onion, TorErrorInvalidSetting, TorErrorAutomatic, TorErrorSocketPort, TorErrorSocketFile, TorErrorMissingPassword, TorErrorUnreadableCookieFile, TorErrorAuthError
|
||||
from onionshare.onion import Onion, TorErrorInvalidSetting, TorErrorAutomatic, TorErrorSocketPort, TorErrorSocketFile, TorErrorMissingPassword, TorErrorUnreadableCookieFile, TorErrorAuthError, TorErrorProtocolError
|
||||
|
||||
from .alert import Alert
|
||||
|
||||
|
@ -216,7 +216,7 @@ class SettingsDialog(QtWidgets.QDialog):
|
|||
# If an exception hasn't been raised yet, the Tor settings work
|
||||
Alert(strings._('settings_test_success', True).format(onion.tor_version, onion.supports_ephemeral, onion.supports_stealth))
|
||||
|
||||
except (TorErrorInvalidSetting, TorErrorAutomatic, TorErrorSocketPort, TorErrorSocketFile, TorErrorMissingPassword, TorErrorUnreadableCookieFile, TorErrorAuthError) as e:
|
||||
except (TorErrorInvalidSetting, TorErrorAutomatic, TorErrorSocketPort, TorErrorSocketFile, TorErrorMissingPassword, TorErrorUnreadableCookieFile, TorErrorAuthError, TorErrorProtocolError) as e:
|
||||
Alert(e.args[0], QtWidgets.QMessageBox.Warning)
|
||||
|
||||
def save_clicked(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue