All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Goldish <mgoldish@redhat.com>
To: Yolkfull Chow <yzhou@redhat.com>
Cc: sudhir kumar <smalikphy@gmail.com>,
	yogi <anantyog@linux.vnet.ibm.com>, Uri Lublin <uril@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [KVM-AUTOTEST] [PATCH] fix a little problem for kvm_config.py
Date: Mon, 8 Jun 2009 05:43:18 -0400 (EDT)	[thread overview]
Message-ID: <1771812210.1409891244454198038.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> (raw)
In-Reply-To: <4A1B5577.7070703@redhat.com>

Looks good to me -- thanks.

----- Original Message -----
From: "Yolkfull Chow" <yzhou@redhat.com>
To: kvm@vger.kernel.org
Cc: "sudhir kumar" <smalikphy@gmail.com>, "yogi" <anantyog@linux.vnet.ibm.com>, "Uri Lublin" <uril@redhat.com>, 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


----------------------------------------------------------------------------------------------------------------------------------------
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
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-06-08  9:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1818401549.327921243244441830.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-05-25  9:53 ` [KVM-AUTOTEST] [PATCH] support for remote migration Michael Goldish
2009-05-26  2:35   ` [KVM-AUTOTEST] [PATCH] fix a little problem for kvm_config.py Yolkfull Chow
2009-06-08  9:43     ` Michael Goldish [this message]
2009-05-26  5:18   ` [KVM-AUTOTEST] [PATCH] support for remote migration sudhir kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1771812210.1409891244454198038.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com \
    --to=mgoldish@redhat.com \
    --cc=anantyog@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=smalikphy@gmail.com \
    --cc=uril@redhat.com \
    --cc=yzhou@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.