From a5bd3715683690498cef82c2efc132a46de3f60e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 4 Nov 2013 07:16:28 +0100 Subject: Manually adding --version to argparse in python stub since python 3.3 dropped the version keyword. --- components/source_hooks | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/source_hooks') diff --git a/components/source_hooks b/components/source_hooks index d414c424e..baba70c46 100755 --- a/components/source_hooks +++ b/components/source_hooks @@ -30,11 +30,11 @@ def main(): description = '''live-build contains the components to build a live system from a configuration directory. The source_hooks command executes hooks after the source stage.''', epilog = 'See \'man lb_source_hooks\' for more information.', - version = 'live-build 4', formatter_class = argparse.ArgumentDefaultsHelpFormatter ) - arguments.add_argument('--verbose', help='set verbose option', action='store_true') + arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4') + arguments.add_argument('--verbose', help='set verbose option', action='store_true') args = arguments.parse_args() -- cgit v1.2.3