[Pkg-privacy-commits] [torbrowser-launcher] 01/15: Ensure that the version is a string, not unicode (#205)

Holger Levsen holger at moszumanska.debian.org
Fri Nov 13 17:54:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to annotated tag debian/0.2.2-1
in repository torbrowser-launcher.

commit 83c5b1917dc6980d8d35f833068ab685bbb64a22
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