[Pkg-privacy-commits] [tails-installer] 03/17: Support unicode strings in TailsInstallerWindow.status().

Ulrike Uhlig ulrike at moszumanska.debian.org
Mon Mar 12 14:21:14 UTC 2018


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

ulrike pushed a commit to branch tails/master
in repository tails-installer.

commit d22fb79a0ce92d2b7a09334caef408086eccf83f
Author: anonym <anonym at riseup.net>
Date:   Sat Jan 27 09:23:16 2018 +0100

    Support unicode strings in TailsInstallerWindow.status().
    
    In non-English locales some of the status messages contain non-ascii
    characters, which we then try to decode to ascii via str() => crash.
---
 tails_installer/gui.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index b5c6f3d..21e5d27 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -639,7 +639,9 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
     def status(self, text):
         self.live.log.debug("Argument is of type '%(type)s'"
                             % {'type': type(text).__name__})
-        if isinstance(text, Exception) \
+        if isinstance(text, str) or isinstance(text, unicode):
+            pass
+        elif isinstance(text, Exception) \
            and hasattr(text, 'args') \
            and type(text.args).__name__ == 'list':
             text = text.args[0]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list