Use ValueError.args since direct indexing of ValueError is not
authorZac Medico <zmedico@gentoo.org>
Thu, 5 Aug 2010 22:22:53 +0000 (15:22 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 5 Aug 2010 22:22:53 +0000 (15:22 -0700)
supported in python3, as reported in bug 241132, commment #4.

pym/_emerge/actions.py
pym/_emerge/main.py

index bbab613b32028e5d6b24f6460a56c98853abcfb4..e8c6e3ad16845441bea3b02012a1bfa3127347c6 100644 (file)
@@ -2354,7 +2354,7 @@ def action_uninstall(settings, trees, ldpath_mtimes,
                                for line in textwrap.wrap(msg, 70):
                                        writemsg_level("!!! %s\n" % (line,),
                                                level=logging.ERROR, noiselevel=-1)
-                               for i in e[0]:
+                               for i in e.args[0]:
                                        writemsg_level("    %s\n" % colorize("INFORM", i),
                                                level=logging.ERROR, noiselevel=-1)
                                writemsg_level("\n", level=logging.ERROR, noiselevel=-1)
index 92df3bfb402c0c839ed1353f6f73e0cda601540d..aa5891f9073c8412e7c374dfa3a783bb1cd6aec1 100644 (file)
@@ -1607,7 +1607,7 @@ def emerge_main():
                                        for line in textwrap.wrap(msg, 70):
                                                writemsg_level("!!! %s\n" % (line,),
                                                        level=logging.ERROR, noiselevel=-1)
-                                       for i in e[0]:
+                                       for i in e.args[0]:
                                                writemsg_level("    %s\n" % colorize("INFORM", i),
                                                        level=logging.ERROR, noiselevel=-1)
                                        writemsg_level("\n", level=logging.ERROR, noiselevel=-1)