Bug #325505: Fix UnicodeEncodeError in _emerge.actions.action_info().
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Fri, 25 Jun 2010 17:29:52 +0000 (19:29 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Fri, 25 Jun 2010 17:29:52 +0000 (19:29 +0200)
pym/_emerge/actions.py

index d5035cca98ffd3d01f2c90570aa81588a38e206f..9e2c88fe04ec1a917e0dfb19905a0b0c53a8a783 100644 (file)
@@ -1296,7 +1296,10 @@ def action_info(settings, trees, myopts, myfiles):
        for x in myvars:
                if x in settings:
                        if x != "USE":
-                               print('%s="%s"' % (x, settings[x]))
+                               try:
+                                       print('%s="%s"' % (x, settings[x]))
+                               except UnicodeEncodeError:
+                                       print('%s=<unprintable value with representation: %s>' % (x, repr(settings[x])))
                        else:
                                use = set(settings["USE"].split())
                                for varname in use_expand: