[Pkg-privacy-commits] [torbrowser-launcher] 18/39: Give more intelligence errors if connection error while using socks proxy

Roger Shimizu rosh at debian.org
Tue Mar 27 15:41:52 UTC 2018


This is an automated email from the git hooks/post-receive script.

rosh pushed a commit to branch rosh/experimental
in repository torbrowser-launcher.

commit 055a26ca51c204695e4509c22591571d959dcfa7
Author: Micah Lee <micah at micahflee.com>
Date:   Fri Mar 23 12:56:32 2018 -0700

    Give more intelligence errors if connection error while using socks proxy
---
 torbrowser_launcher/launcher.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index 959a2ac..c058b70 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -536,9 +536,13 @@ class DownloadThread(QtCore.QThread):
 
             except requests.exceptions.ConnectionError:
                 # Connection error
-                message = _("Error starting download:\n\n{0}\n\nAre you connected to the internet?").format(self.url.decode())
-                self.download_error.emit('error', message)
-                # TODO: check for SSL error, also check if connecting over Tor if there's a socks5 error
+                if self.common.settings['download_over_tor']:
+                    message = _("Error starting download:\n\n{0}\n\nTrying to download over Tor. Are you sure Tor is configured correctly and running?").format(self.url.decode())
+                    self.download_error.emit('error', message)
+                else:
+                    message = _("Error starting download:\n\n{0}\n\nAre you connected to the internet?").format(self.url.decode())
+                    self.download_error.emit('error', message)
+
                 return
 
         self.download_complete.emit()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git



More information about the Pkg-privacy-commits mailing list