qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] trace backend: introduce multi tracing backend
Date: Tue, 4 Feb 2014 09:34:36 +0100	[thread overview]
Message-ID: <20140204083436.GB6919@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <52F07980.5020304@jp.fujitsu.com>

On Tue, Feb 04, 2014 at 02:24:16PM +0900, Kazuya Saito wrote:
> (2014/01/31 6:00), Stefan Hajnoczi wrote:> On Tue, Jan 28, 2014 at 01:35:20PM +0900, Kazuya Saito wrote:
> >> diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
> >> index 175df08..a0addb5 100644
> >> --- a/scripts/tracetool/__init__.py
> >> +++ b/scripts/tracetool/__init__.py
> >> @@ -242,14 +242,19 @@ def generate(fevents, format, backend,
> >>      if not tracetool.format.exists(mformat):
> >>          raise TracetoolError("unknown format: %s" % format)
> >>
> >> -    backend = str(backend)
> >> +    backends = str(backend).split(",")
> >>      if len(backend) is 0:
> >
> > Before you modified the code it converted 'backend' to a string.  Now it
> > tests len(backend) without converting it to a string.
> >
> > I suggest s/backend/backends/ in this line to avoid that semantic
> > change.
> 
> "backends" is a list not a string.  So, I'll modify it to the following.
> 
>     backends = str(backend).split(",")
>     for backend in backends:
>         if len(backend) is 0:

You are right:

>>> ''.split(',')
['']

I thought it returns [].

Stefan

  reply	other threads:[~2014-02-04  8:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28  4:35 [Qemu-devel] [PATCH] trace backend: introduce multi tracing backend Kazuya Saito
2014-01-30 21:00 ` Stefan Hajnoczi
2014-02-04  5:24   ` Kazuya Saito
2014-02-04  8:34     ` Stefan Hajnoczi [this message]
2014-01-31 10:37 ` Stefan Hajnoczi
2014-02-04  5:26   ` Kazuya Saito
2014-02-04  9:02     ` Stefan Hajnoczi
2014-02-05  8:51       ` Kazuya Saito

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=20140204083436.GB6919@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=saito.kazuya@jp.fujitsu.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;
as well as URLs for NNTP newsgroup(s).