Skip to contentSkip to conversation

Fix kvm_config.py -f <filename> mode

PATCH In review Ryan Harper 2 participants 2 messages Nov 2, 2009 – Nov 3, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix kvm_config.py -f <filename> mode

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.

client/tests/kvm/kvm_config.py +1 -1
index 3114c07..52de4c7 100755
@@ -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.')
Signature · 4 lines
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
[email protected]
#1 lore raw

Ooops, fixed. Thanks Ryan!

Quoted 34 lines · Ryan Harper

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.

client/tests/kvm/kvm_config.py +0 -0
index 3114c07..52de4c7 100755
@@ -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
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Lucas