Commit 12d2fe08 authored by Vincent Pelletier's avatar Vincent Pelletier

cli,http: Use future-compatible --version declaration.

argparse.__init__'s "version" argument is for backward-compatibility with
optparse, and is dropped in python3.
parent feb5cae6
......@@ -347,6 +347,10 @@ def main(argv=None):
"""
parser = argparse.ArgumentParser(
description='caucase',
)
parser.add_argument(
'--version',
action='version',
version=version.__version__,
)
# XXX: currently, it is the server which chooses which digest is used to sign
......@@ -635,6 +639,10 @@ def probe(argv=None):
"""
parser = argparse.ArgumentParser(
description='caucase probe - Verify basic caucase server functionality',
)
parser.add_argument(
'--version',
action='version',
version=version.__version__,
)
parser.add_argument(
......@@ -665,6 +673,10 @@ def updater(argv=None, until=utils.until):
parser = argparse.ArgumentParser(
description='caucase updater - '
'Bootstrap certificate and companion files and keep them up-to-date',
)
parser.add_argument(
'--version',
action='version',
version=version.__version__,
)
parser.add_argument(
......@@ -883,6 +895,10 @@ def rerequest(argv=None):
description='caucase rerequest - '
'Produce a new private key and sign a CSR created by copying an existing, '
'well-signed CSR.',
)
parser.add_argument(
'--version',
action='version',
version=version.__version__,
)
parser.add_argument(
......@@ -942,6 +958,10 @@ def key_id(argv=None):
description='caucase key id - '
'Displays key identifier from private key, and the list of acceptable key'
'identifiers for a given backup file.',
)
parser.add_argument(
'--version',
action='version',
version=version.__version__,
)
parser.add_argument(
......
......@@ -416,6 +416,10 @@ def main(
"""
parser = argparse.ArgumentParser(
description='caucased',
)
parser.add_argument(
'--version',
action='version',
version=version.__version__,
)
parser.add_argument(
......@@ -879,6 +883,10 @@ def manage(argv=None):
"""
parser = argparse.ArgumentParser(
description='caucased caucased database management tool',
)
parser.add_argument(
'--version',
action='version',
version=version.__version__,
)
parser.add_argument(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment