[kernel-team] 24/47: get-modules-enabled: Proper show usage and report wrong number of arguments

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Dec 21 00:30:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository kernel-team.

commit c01fa30fbec0c84d00f5e9e4cfbd963437cec817
Author: Ben Hutchings <benh at debian.org>
Date:   Thu Feb 21 02:33:43 2013 +0000

    get-modules-enabled: Proper show usage and report wrong number of arguments
    
    svn path=/people/benh/; revision=19831
---
 scripts/benh/get-modules-enabled | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/benh/get-modules-enabled b/scripts/benh/get-modules-enabled
index 4cacda4..5effc2b 100755
--- a/scripts/benh/get-modules-enabled
+++ b/scripts/benh/get-modules-enabled
@@ -113,7 +113,7 @@ def main(check_all, list_builtin, list_modules, config_path, source_path):
 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 @@ if __name__ == '__main__':
     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,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git



More information about the Kernel-svn-changes mailing list