From patchwork Mon Jun 8 09:43:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 28607 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 n589hQNC007740 for ; Mon, 8 Jun 2009 09:43:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753062AbZFHJnU (ORCPT ); Mon, 8 Jun 2009 05:43:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753321AbZFHJnU (ORCPT ); Mon, 8 Jun 2009 05:43:20 -0400 Received: from mx1.redhat.com ([66.187.233.31]:35294 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752992AbZFHJnT (ORCPT ); Mon, 8 Jun 2009 05:43:19 -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 n589hKOK004522; Mon, 8 Jun 2009 05:43:20 -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 n589hI0Y013920; Mon, 8 Jun 2009 05:43:18 -0400 Date: Mon, 8 Jun 2009 05:43:18 -0400 (EDT) From: Michael Goldish To: Yolkfull Chow Cc: sudhir kumar , yogi , Uri Lublin , kvm@vger.kernel.org Message-ID: <1771812210.1409891244454198038.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> In-Reply-To: <4A1B5577.7070703@redhat.com> Subject: Re: [KVM-AUTOTEST] [PATCH] fix a little problem for kvm_config.py 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 Looks good to me -- thanks. ----- Original Message ----- From: "Yolkfull Chow" To: kvm@vger.kernel.org Cc: "sudhir kumar" , "yogi" , "Uri Lublin" , kvm@vger.kernel.org Sent: Tuesday, May 26, 2009 5:35:35 AM (GMT+0200) Auto-Detected Subject: [KVM-AUTOTEST] [PATCH] fix a little problem for kvm_config.py Hi Everyone: I would submit a little patch for kvm_config.py. Since I found if a string contains a pair of '"' or "'", and one of the pair is at the end of the string, such as: 'systeminfo^ | find "Memory"' ( which is used to catch memory of windows ), the quotation mark at the end of the string will be stripped whereas another will not. That is to say, if we use only this clause : temp[i] = temp[i].strip("\"\'") , the string above will be stripped to be: systeminfo^ | find "Memory . So I would suggest we only strip the quotation marks that existing at both the beginning and the end of the string. Any comments/criticism will be high appreciated. Thanks & Regards, Yingfu ---------------------------------------------------------------------------------------------------------------------------------------- More majordomo info at http://vger.kernel.org/majordomo-info.html --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/client/tests/kvm_runtest_2/kvm_config.py b/client/tests/kvm_runtest_2/kvm_config.py index 4a1e7b4..dd43bd1 100755 --- a/client/tests/kvm_runtest_2/kvm_config.py +++ b/client/tests/kvm_runtest_2/kvm_config.py @@ -97,7 +97,10 @@ class config: temp = str.split(sep) for i in range(len(temp)): temp[i] = temp[i].strip() - temp[i] = temp[i].strip("\"\'") + if re.findall("^\".*\"$", temp[i]): + temp[i] = temp[i].strip("\"") + elif re.findall("^\'.*\'$", temp[i]): + temp[i] = temp[i].strip("\'") return temp -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org