[Pkg-privacy-commits] [torbrowser-launcher] 10/11: Only convert unicode URLs to strings if they are actually 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 28f68e572ca3ee332d76ec57152974ecec08a0aa
Author: Micah Lee <micah at micahflee.com>
Date: Sun Nov 8 16:27:03 2015 -0800
Only convert unicode URLs to strings if they are actually unicode (#205)
---
torbrowser_launcher/launcher.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index f5ecc68..2f17f2c 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -436,7 +436,10 @@ class Launcher:
self.current_download_url = url
mirror_url = url.format(self.common.settings['mirror'])
- mirror_url = unicodedata.normalize('NFKD', mirror_url).encode('ascii','ignore') # fix for #205
+
+ # convert mirror_url from unicode to string, if needed (#205)
+ if isinstance(mirror_url, unicode):
+ mirror_url = unicodedata.normalize('NFKD', mirror_url).encode('ascii','ignore')
# initialize the progress bar
self.progressbar.set_fraction(0)
--
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