Re: [PATCH] In text mode we have to treat strings and lists separately while printing them (#674322)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 4 Feb 2011, Chris Lumens wrote:

diff --git a/text.py b/text.py
index bd694e3..e07553d 100644
--- a/text.py
+++ b/text.py
@@ -304,7 +304,14 @@ class InstallInterface(InstallInterfaceBase):
                               default=None, custom_icon=None,
                               custom_buttons=[], expanded=False):
         t = TextboxReflowed(60, text, maxHeight=8)
-        lt = Textbox(60, 6, "\n".join(longText), scroll=1, wrap=1)
+
+        # if it is a string, just print it as it is (#674322)
+        if isinstance(longText, basestring):
+            lt = Textbox(60, 6, longText, scroll=1, wrap=1)
+        # if the argument is anything else we have to join it together (#654074)
+        else:
+            lt = Textbox(60, 6, "\n".join(longText), scroll=1, wrap=1)
+
         g = GridFormHelp(self.screen, title, help, 1, 3)
         g.add(t, 0, 0)
         g.add(lt, 0, 1, padding = (0, 1, 0, 1))

ACK.

David - your patch won't work here because this code gets called both
for these package messages (which are strings) and for exception
reporting (which is a list of strings).


Right, exception reporting.  OK, cool.  Still an easy fix.

--
David Cantrell <dcantrell@xxxxxxxxxx>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Honolulu, HI | UTC-10

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux