[Pkg-privacy-commits] [torbrowser-launcher] 09/11: Force download URLs to be strings and not unicode (#205)

Holger Levsen holger at moszumanska.debian.org
Sat Dec 5 17:59:28 UTC 2015


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 aacab8aeed2878220487912146e3b6f7f8d106da
Author: Micah Lee <micah at micahflee.com>
Date:   Sun Nov 8 16:23:30 2015 -0800

    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 36c54db..f5ecc68 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
@@ -435,8 +435,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()

-- 
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