From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: Lukas Doktor <ldoktor@redhat.com>
Cc: jzupka@redhat.com, autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] FIX matrix_to_string: header columns width ADD matrix_to_string: accept header of type tupple or list
Date: Wed, 29 Sep 2010 08:02:01 -0300 [thread overview]
Message-ID: <1285758121.2505.6.camel@freedom> (raw)
In-Reply-To: <1285752794-17191-2-git-send-email-ldoktor@redhat.com>
On Wed, 2010-09-29 at 11:33 +0200, Lukas Doktor wrote:
> Signed-off-by: Lukas Doktor <ldoktor@redhat.com>
Ooops, my bad, I forgot about the header. Looks good to me, applied,
thanks!
http://autotest.kernel.org/changeset/4818
Lucas
> ---
> client/common_lib/utils.py | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py
> index f44dd1e..6b8cdf6 100644
> --- a/client/common_lib/utils.py
> +++ b/client/common_lib/utils.py
> @@ -211,9 +211,14 @@ def matrix_to_string(matrix, header=None):
> in each column, and determining the format string dynamically.
>
> @param matrix: Matrix representation (list with n rows of m elements).
> - @param header: Optional tuple with header elements to be displayed.
> + @param header: Optional tuple or list with header elements to be displayed.
> """
> + if type(header) is list:
> + header = tuple(header)
> lengths = []
> + if header:
> + for column in header:
> + lengths.append(len(column))
> for row in matrix:
> for column in row:
> i = row.index(column)
prev parent reply other threads:[~2010-09-29 11:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 9:33 [KVM-autotest][patch] matrix_to_string: header columns width Lukas Doktor
2010-09-29 9:33 ` [PATCH] FIX matrix_to_string: header columns width ADD matrix_to_string: accept header of type tupple or list Lukas Doktor
2010-09-29 11:02 ` Lucas Meneghel Rodrigues [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285758121.2505.6.camel@freedom \
--to=lmr@redhat.com \
--cc=autotest@test.kernel.org \
--cc=jzupka@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=ldoktor@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox