1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: Added version to programs
This patch adds a command line option --version that outputs a version string
that is usable by help2man tool.
Author: Mazen Neifer <mazen@debian.org>
Origin: Debian
Bug: https://github.com/chrysn/aiocoap/issues/374
Forwarded: yes
Last-Update: 2025-04-03
Index: aiocoap/aiocoap/cli/proxy.py
===================================================================
--- aiocoap.orig/aiocoap/cli/proxy.py
+++ aiocoap/aiocoap/cli/proxy.py
@@ -22,6 +22,9 @@ from aiocoap.cli.common import add_serve
def build_parser():
p = argparse.ArgumentParser(description=__doc__)
+ p.add_argument(
+ "--version", action="version", version="%(prog)s " + aiocoap.meta.version
+ )
mode = p.add_argument_group(
"mode", "Required argument for setting the operation mode"
|