qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] trace backend: introduce multi tracing backend


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] trace backend: introduce multi tracing backend
Date: Tue, 4 Feb 2014 09:34:36 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]