[kernel] r19831 - people/benh
Ben Hutchings
benh at alioth.debian.org
Thu Feb 21 02:33:44 UTC 2013
Author: benh
Date: Thu Feb 21 02:33:43 2013
New Revision: 19831
Log:
get-modules-enabled: Proper show usage and report wrong number of arguments
Modified:
people/benh/get-modules-enabled
Modified: people/benh/get-modules-enabled
==============================================================================
--- people/benh/get-modules-enabled Wed Feb 20 15:17:39 2013 (r19830)
+++ people/benh/get-modules-enabled Thu Feb 21 02:33:43 2013 (r19831)
@@ -113,7 +113,7 @@
if __name__ == '__main__':
from optparse import OptionParser
- parser = OptionParser()
+ parser = OptionParser(usage='%prog [options] config-file source-dir')
parser.add_option('--check-all', action='store_true',
help='Check all tristate options')
parser.add_option('--builtin', action='store_true',
@@ -121,6 +121,8 @@
parser.add_option('--modules', action='store_true',
help='List only actual modules')
options, args = parser.parse_args()
+ if len(args) != 2:
+ parser.error('wrong number of arguments')
main(options.check_all,
options.builtin or not options.modules,
More information about the Kernel-svn-changes
mailing list