]> git.lizzy.rs Git - torbrowser-launcher.git/commitdiff
Give more intelligence errors if connection error while using socks proxy
authorMicah Lee <micah@micahflee.com>
Fri, 23 Mar 2018 19:56:32 +0000 (12:56 -0700)
committerMicah Lee <micah@micahflee.com>
Fri, 23 Mar 2018 19:56:32 +0000 (12:56 -0700)
torbrowser_launcher/launcher.py

index 959a2aca66a22b95f3406859689735b3683e83bd..c058b70ddba18820186ed64db72971da0f8c24a6 100644 (file)
@@ -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()