[Pkg-privacy-commits] [torbrowser-launcher] 10/10: error message for socks failures (Closes: #797337)
Holger Levsen
holger at moszumanska.debian.org
Thu Mar 3 14:38:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository torbrowser-launcher.
commit 89b79e03a6cff09385ac12b997c316ad6baa6129
Author: Holger Levsen <holger at layer-acht.org>
Date: Tue Mar 1 16:59:42 2016 +0100
error message for socks failures (Closes: #797337)
thanks to Michael Gold <michael at bitplane.org>
---
torbrowser_launcher/launcher.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index e32f2db..2c95352 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -32,7 +32,7 @@ from twisted.web.client import Agent, RedirectAgent, ResponseDone, ResponseFaile
from twisted.web.http_headers import Headers
from twisted.web.iweb import IPolicyForHTTPS
from twisted.internet.protocol import Protocol
-from twisted.internet.error import DNSLookupError
+from twisted.internet.error import DNSLookupError, ConnectionRefusedError
import xml.etree.ElementTree as ET
@@ -363,6 +363,13 @@ class Launcher:
else:
self.set_gui('error', _('The SSL certificate served by https://www.torproject.org is invalid! You may be under attack.'), [], False)
+ elif isinstance(f.value, ConnectionRefusedError) and self.common.settings['download_over_tor']:
+ # If we're using Tor, we'll only get this error when we fail to
+ # connect to the SOCKS server. If the connection fails at the
+ # remote end, we'll get txsocksx.errors.ConnectionRefused.
+ addr = self.common.settings['tor_socks_address']
+ self.set_gui('error', _("Error connecting to Tor at {0}").format(addr), [], False)
+
else:
self.set_gui('error', _("Error starting download:\n\n{0}\n\nAre you connected to the internet?").format(f.value), [], False)
--
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