From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAbSw-0007nR-HZ for qemu-devel@nongnu.org; Tue, 04 Feb 2014 03:34:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAbSq-0007Jr-Em for qemu-devel@nongnu.org; Tue, 04 Feb 2014 03:34:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAbSq-0007JK-7l for qemu-devel@nongnu.org; Tue, 04 Feb 2014 03:34:40 -0500 Date: Tue, 4 Feb 2014 09:34:36 +0100 From: Stefan Hajnoczi Message-ID: <20140204083436.GB6919@stefanha-thinkpad.redhat.com> References: <52E73388.90601@jp.fujitsu.com> <20140130210034.GD15494@stefanha-thinkpad.redhat.com> <52F07980.5020304@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52F07980.5020304@jp.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH] trace backend: introduce multi tracing backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kazuya Saito Cc: "qemu-devel@nongnu.org" 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