diff mbox

[KVM-AUTOTEST,1/4] KVM test: kvm_config.py: parse extra strings passed as command line args

Message ID 1297965109-14293-1-git-send-email-mgoldish@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Goldish Feb. 17, 2011, 5:51 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py
index 807a204..cab0022 100755
--- a/client/tests/kvm/kvm_config.py
+++ b/client/tests/kvm/kvm_config.py
@@ -640,7 +640,9 @@  class FileReader(StrReader):
 
 
 if __name__ == "__main__":
-    parser = optparse.OptionParser("usage: %prog [options] <filename>")
+    parser = optparse.OptionParser('usage: %prog [options] filename '
+                                   '[extra code] ...\n\nExample:\n\n    '
+                                   '%prog tests.cfg "only my_set" "no qcow2"')
     parser.add_option("-v", "--verbose", dest="debug", action="store_true",
                       help="include debug messages in console output")
     parser.add_option("-f", "--fullname", dest="fullname", action="store_true",
@@ -653,6 +655,9 @@  if __name__ == "__main__":
         parser.error("filename required")
 
     c = Parser(args[0], debug=options.debug)
+    for s in args[1:]:
+        c.parse_string(s)
+
     for i, d in enumerate(c.get_dicts()):
         if options.fullname:
             print "dict %4d:  %s" % (i + 1, d["name"])