[Pkg-privacy-commits] [torbrowser-launcher] 09/11: 1ff1055 Force download URLs to be strings and not unicode (#205).
Holger Levsen
holger at moszumanska.debian.org
Sat Jan 16 12:31:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch debian/jessie
in repository torbrowser-launcher.
commit 1bce785d1547e92103087aafd5fc2c520b349a85
Author: Holger Levsen <holger at layer-acht.org>
Date: Sat Jan 16 13:14:56 2016 +0100
1ff1055 Force download URLs to be strings and not unicode (#205).
---
debian/changelog | 1 +
...oad-URLs-to-be-strings-and-not-unicode-20.patch | 37 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 39 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 8882f40..95eedb3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,7 @@ torbrowser-launcher (0.1.9-1+deb8u2) UNRELEASED; urgency=medium
(Closes: #804184)
- ab141ee Stop using sha256sums.txt and sha256sums.txt.asc (fixes #180),
(includes 7829f3e cleanup commit.)
+ - 1ff1055 Force download URLs to be strings and not unicode (#205).
-- Holger Levsen <holger at debian.org> Fri, 15 Jan 2016 20:46:52 +0100
diff --git a/debian/patches/0009-Force-download-URLs-to-be-strings-and-not-unicode-20.patch b/debian/patches/0009-Force-download-URLs-to-be-strings-and-not-unicode-20.patch
new file mode 100644
index 0000000..2238f89
--- /dev/null
+++ b/debian/patches/0009-Force-download-URLs-to-be-strings-and-not-unicode-20.patch
@@ -0,0 +1,37 @@
+From 1ff10552d0498d4f0edda6c27ab88a132fb52d57 Mon Sep 17 00:00:00 2001
+From: Micah Lee <micah at micahflee.com>
+Date: Sun, 8 Nov 2015 16:23:30 -0800
+Subject: [PATCH] Force download URLs to be strings and not unicode (#205)
+
+---
+ torbrowser_launcher/launcher.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
+index d057410..671bee7 100644
+--- a/torbrowser_launcher/launcher.py
++++ b/torbrowser_launcher/launcher.py
+@@ -26,7 +26,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ """
+
+-import os, subprocess, time, json, tarfile, hashlib, lzma, threading, re
++import os, subprocess, time, json, tarfile, hashlib, lzma, threading, re, unicodedata
+ from twisted.internet import reactor
+ from twisted.web.client import Agent, RedirectAgent, ResponseDone, ResponseFailed
+ from twisted.web.http_headers import Headers
+@@ -446,8 +446,10 @@ class Launcher:
+ self.current_download_path = path
+ self.current_download_url = url
+
+- # initialize the progress bar
+ mirror_url = url.format(self.common.settings['mirror'])
++ mirror_url = unicodedata.normalize('NFKD', mirror_url).encode('ascii','ignore') # fix for #205
++
++ # initialize the progress bar
+ self.progressbar.set_fraction(0)
+ self.progressbar.set_text(_('Downloading {0}').format(name))
+ self.progressbar.show()
+--
+1.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index badac19..4b0d86b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
0006-Get-stable-version-using-torbrowser-updater-xml.patch
0007-Stop-using-sha256sums.txt-and-sha256sums.txt.asc-fix.patch
0008-Eek-removed-testing-code-that-never-should-have-been.patch
+0009-Force-download-URLs-to-be-strings-and-not-unicode-20.patch
--
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