[Pkg-privacy-commits] [torbrowser-launcher] 01/14: Ensure that the version is a string, not unicode (#205)
Holger Levsen
holger at moszumanska.debian.org
Sat Dec 5 14:30:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch debian/sid
in repository torbrowser-launcher.
commit 7829f3e1960f5e8533e81c3a38854ebb5b354292
Author: Micah Lee <micah at micahflee.com>
Date: Sun Nov 8 16:11:43 2015 -0800
Ensure that the version is a string, not unicode (#205)
---
torbrowser_launcher/common.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
index 2df0161..478b71a 100644
--- a/torbrowser_launcher/common.py
+++ b/torbrowser_launcher/common.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, sys, platform, subprocess, locale, pickle, json, psutil
+import os, sys, platform, subprocess, locale, pickle, json, psutil, unicodedata
import pygtk
pygtk.require('2.0')
@@ -88,6 +88,9 @@ class Common:
# build all relevant paths
def build_paths(self, tbb_version=None):
+ # ensure that tbb_version is a string and not unicode
+ tbb_version = unicodedata.normalize('NFKD', tbb_version).encode('ascii','ignore')
+
homedir = os.getenv('HOME')
if not homedir:
homedir = '/tmp/.torbrowser-'+os.getenv('USER')
--
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