public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: autotest@test.kernel.org
Cc: kvm@vger.kernel.org
Subject: [KVM-AUTOTEST][PATCH] Fix kvm_config.py -f <filename> mode
Date: Mon, 2 Nov 2009 17:28:01 -0600	[thread overview]
Message-ID: <20091102232801.GR13808@us.ibm.com> (raw)

kvm_config.py supports specifying a different filename for
test config.  This patch fixes the option parsing parameters.
Currently it uses 'store_true' which stores the value True into
the filename variable; we want the 'store' mode which will store
the value of the option (aka, the filename) in the variable.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>

diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py
index 3114c07..52de4c7 100755
--- a/client/tests/kvm/kvm_config.py
+++ b/client/tests/kvm/kvm_config.py
@@ -501,7 +501,7 @@ class config:
 
 if __name__ == "__main__":
     parser = optparse.OptionParser()
-    parser.add_option('-f', '--file', dest="filename", action='store_true',
+    parser.add_option('-f', '--file', dest="filename", action='store',
                       help='path to a config file that will be parsed. '
                            'If not specified, will parse kvm_tests.cfg '
                            'located inside the kvm test dir.')



-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com

             reply	other threads:[~2009-11-02 23:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 23:28 Ryan Harper [this message]
2009-11-03 12:19 ` [KVM-AUTOTEST][PATCH] Fix kvm_config.py -f <filename> mode Lucas Meneghel Rodrigues

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=20091102232801.GR13808@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox