aboutsummaryrefslogtreecommitdiff
path: root/desktop/onionshare/gui_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/onionshare/gui_common.py')
-rw-r--r--desktop/onionshare/gui_common.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/desktop/onionshare/gui_common.py b/desktop/onionshare/gui_common.py
index bb7e1f1b..e3d712f5 100644
--- a/desktop/onionshare/gui_common.py
+++ b/desktop/onionshare/gui_common.py
@@ -41,7 +41,7 @@ from onionshare_cli.onion import (
PortNotAvailable,
)
from onionshare_cli.meek import Meek
-
+from onionshare_cli.web.web import WaitressException
class GuiCommon:
"""
@@ -581,6 +581,13 @@ class GuiCommon:
return strings._("error_port_not_available")
return None
+ @staticmethod
+ def get_translated_web_error(e):
+ """
+ Takes an exception defined in web.py and returns a translated error message
+ """
+ if type(e) is WaitressException:
+ return strings._("waitress_web_server_error")
class ToggleCheckbox(QtWidgets.QCheckBox):
def __init__(self, text):