From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: Re: [KVM-AUTOTEST PATCH 06/06] kvm_config: Make split_and_strip function to strip the right quotes Date: Wed, 10 Jun 2009 16:30:21 -0300 Message-ID: <1244662221.22524.16.camel@localhost.localdomain> References: <1244507691-9575-1-git-send-email-lmr@redhat.com> <1244507691-9575-2-git-send-email-lmr@redhat.com> <1244507691-9575-3-git-send-email-lmr@redhat.com> <1244507691-9575-4-git-send-email-lmr@redhat.com> <1244507691-9575-5-git-send-email-lmr@redhat.com> <1244507691-9575-6-git-send-email-lmr@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Yolkfull Chow To: autotest@test.kernel.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:39647 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758039AbZFJTaV (ORCPT ); Wed, 10 Jun 2009 15:30:21 -0400 In-Reply-To: <1244507691-9575-6-git-send-email-lmr@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 2009-06-08 at 21:34 -0300, Lucas Meneghel Rodrigues wrote: > In some occasions, the current logic to strip quotest from config > parameters might remove valid quotes from the params. This patch > fixes this problem. Applied, thanks! > Signed-off-by: Yolkfull Chow > --- > client/tests/kvm/kvm_config.py | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py > index 40f16f1..5d9b69e 100755 > --- a/client/tests/kvm/kvm_config.py > +++ b/client/tests/kvm/kvm_config.py > @@ -139,7 +139,10 @@ class config: > temp = str.split(sep, 1) > 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 > > -- Lucas Meneghel Rodrigues Software Engineer (QE) Red Hat - Emerging Technologies