diff options
Diffstat (limited to 'gnulib-tool.py')
-rwxr-xr-x | gnulib-tool.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gnulib-tool.py b/gnulib-tool.py index b16becb1d2..a6d4f6fa75 100755 --- a/gnulib-tool.py +++ b/gnulib-tool.py @@ -340,6 +340,17 @@ def main(): # Parse the given arguments. cmdargs = parser.parse_args() + # Handle --help and --version, ignoring all other options. + if cmdargs.help != None: + print(info.usage()) + sys.exit(0) + if cmdargs.version != None: + message = '''gnulib-tool (%s %s)%s\n%s\n%s\n\nWritten by %s.''' % \ + (info.package(), info.date(), info.version(), info.copyright(), + info.license(), info.authors()) + print(message) + sys.exit(0) + # Determine when user tries to combine modes. args = [ cmdargs.mode_list, @@ -374,15 +385,6 @@ def main(): sys.exit(1) # Determine selected mode. - if cmdargs.help != None: - print(info.usage()) - sys.exit(0) - if cmdargs.version != None: - message = '''gnulib-tool (%s %s)%s\n%s\n%s\n\nWritten by %s.''' % \ - (info.package(), info.date(), info.version(), info.copyright(), - info.license(), info.authors()) - print(message) - sys.exit(0) if cmdargs.mode_list != None: mode = 'list' if cmdargs.mode_import != None: |