From patchwork Fri May 22 11:05:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 25387 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4MB5FR1003342 for ; Fri, 22 May 2009 11:05:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753618AbZEVLFL (ORCPT ); Fri, 22 May 2009 07:05:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754170AbZEVLFL (ORCPT ); Fri, 22 May 2009 07:05:11 -0400 Received: from mx1.redhat.com ([66.187.233.31]:53496 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010AbZEVLFK (ORCPT ); Fri, 22 May 2009 07:05:10 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n4MB5B5q011434 for ; Fri, 22 May 2009 07:05:11 -0400 Received: from mail05.corp.redhat.com (zmail05.collab.prod.int.phx2.redhat.com [10.5.5.46]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4MB5AaH032585; Fri, 22 May 2009 07:05:10 -0400 Date: Fri, 22 May 2009 07:05:10 -0400 (EDT) From: Michael Goldish To: David Huff Cc: kvm@vger.kernel.org Message-ID: <825827984.224981242990310267.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> In-Reply-To: <558076627.224761242989864526.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Subject: Re: [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter. MIME-Version: 1.0 X-Originating-IP: [10.5.5.71] X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This makes sense, thanks. One thing though -- I don't know if it's even worth mentioning -- we always try to put a single space after a comma (I think the Python style guide recommends that but I'm not sure). Generally we try to follow the guide (http://www.python.org/dev/peps/pep-0008/) and as far as I know Autotest follows it too. ----- Original Message ----- From: "David Huff" To: kvm@vger.kernel.org Cc: "David Huff" Sent: Thursday, May 21, 2009 6:36:21 PM (GMT+0200) Auto-Detected Subject: [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter. fix modifies kvm_config.split_and_strip so it will only split once per line. example: kernel_args = "ks=floppy console=ttyS0 noacpi" --- client/tests/kvm_runtest_2/kvm_config.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm_runtest_2/kvm_config.py b/client/tests/kvm_runtest_2/kvm_config.py index 4a1e7b4..29a63b7 100755 --- a/client/tests/kvm_runtest_2/kvm_config.py +++ b/client/tests/kvm_runtest_2/kvm_config.py @@ -94,7 +94,7 @@ class config: def split_and_strip(self, str, sep="="): """Split str and strip quotes from the resulting parts.""" - temp = str.split(sep) + temp = str.split(sep,1) for i in range(len(temp)): temp[i] = temp[i].strip() temp[i] = temp[i].strip("\"\'")