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