public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter.
@ 2009-05-21 15:36 David Huff
  0 siblings, 0 replies; 5+ messages in thread
From: David Huff @ 2009-05-21 15:36 UTC (permalink / raw)
  To: kvm; +Cc: David Huff

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("\"\'")
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter.
       [not found] <558076627.224761242989864526.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
@ 2009-05-22 11:05 ` Michael Goldish
  2009-05-24 12:14   ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Goldish @ 2009-05-22 11:05 UTC (permalink / raw)
  To: David Huff; +Cc: kvm

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" <dhuff@redhat.com>
To: kvm@vger.kernel.org
Cc: "David Huff" <dhuff@redhat.com>
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("\"\'")
-- 
1.6.0.6

--
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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter.
  2009-05-22 11:05 ` [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter Michael Goldish
@ 2009-05-24 12:14   ` Avi Kivity
  2009-05-26 15:39     ` David Huff
  0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2009-05-24 12:14 UTC (permalink / raw)
  To: Michael Goldish; +Cc: David Huff, kvm

Michael Goldish wrote:
> 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.
>   

Strongly agree, Python's syntax allows us to write very pretty code, it 
makes sense to preserve this.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter.
  2009-05-24 12:14   ` Avi Kivity
@ 2009-05-26 15:39     ` David Huff
  2009-05-26 15:49       ` [PATCH][KVM_AUTOTEST] " David Huff
  0 siblings, 1 reply; 5+ messages in thread
From: David Huff @ 2009-05-26 15:39 UTC (permalink / raw)
  Cc: kvm

Avi Kivity wrote:
> Michael Goldish wrote:
>> 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.
>>   
> 
> Strongly agree, Python's syntax allows us to write very pretty code, it
> makes sense to preserve this.
> 

Thanks for the advice new patch to follow shortly....

-D

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH][KVM_AUTOTEST] Fix to allow for "=" in the "value" of a config parameter.
  2009-05-26 15:39     ` David Huff
@ 2009-05-26 15:49       ` David Huff
  0 siblings, 0 replies; 5+ messages in thread
From: David Huff @ 2009-05-26 15:49 UTC (permalink / raw)
  To: kvm; +Cc: David Huff

example: kernel_args = "ks=floppy console=ttyS0 noacpi"

fix modifies kvm_config.split_and_strip so it will only split once per line.
---
 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..c4fe6ea 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("\"\'")
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-26 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <558076627.224761242989864526.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-05-22 11:05 ` [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter Michael Goldish
2009-05-24 12:14   ` Avi Kivity
2009-05-26 15:39     ` David Huff
2009-05-26 15:49       ` [PATCH][KVM_AUTOTEST] " David Huff
2009-05-21 15:36 [PATCH] [KVM_Autotest] " David Huff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox