[Yum-devel] [PATCH] Fix blank line at end of all scriptlet output

Ville Skyttä ville.skytta at iki.fi
Fri May 21 16:52:25 UTC 2010


On Friday 21 May 2010, James Antill wrote:

>  I guess a really want .readlines() from the string ... know how to do
> that?

If you really want the readlines() behavior:
    lines = StringIO.StringIO(the_string).readlines()

But I suppose you might be looking for something like this instead:
    lines = [ x for x in the_string.splitlines() if x ]


More information about the Yum-devel mailing list