summaryrefslogtreecommitdiffstats
path: root/cli/objects/images.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-10-05 11:21:19 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-10-05 11:21:19 +0200
commitb1fc9cabb46719f2b9319ead63cafea7a745f710 (patch)
treeb6fe4c07ad777f6ab738ced721c51ba37e6b27e9 /cli/objects/images.py
parenta721957cc46983f3026a30ea2dc814f5eafed1c2 (diff)
objects: add missing prog parameter in subcommands
The specific subcommand name is missing in some of the subcommands help message. For example: $ ogcli list hardware usage: ogcli [-h] --client-ip CLIENT_IP ogcli: error: the following arguments are required: --client-ip Fix this by adding the missing prog= parameter so argparse use this instead of argv[0]. If no prog parameter is specified then argv[0] is printed (i.e: "ogcli").
Diffstat (limited to 'cli/objects/images.py')
-rw-r--r--cli/objects/images.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/objects/images.py b/cli/objects/images.py
index f0e2076..a5faa12 100644
--- a/cli/objects/images.py
+++ b/cli/objects/images.py
@@ -20,7 +20,7 @@ class OgImage():
@staticmethod
def restore_image(rest, args):
- parser = argparse.ArgumentParser()
+ parser = argparse.ArgumentParser(prog='ogcli restore image')
parser.add_argument('--disk',
nargs='?',
required=True,
@@ -101,7 +101,7 @@ class OgImage():
@staticmethod
def create_image(rest, args):
- parser = argparse.ArgumentParser()
+ parser = argparse.ArgumentParser(prog='ogcli create image')
parser.add_argument('--disk',
nargs='?',
required=True,
@@ -156,7 +156,7 @@ class OgImage():
@staticmethod
def update_image(rest, args):
- parser = argparse.ArgumentParser()
+ parser = argparse.ArgumentParser(prog='ogcli update image')
parser.add_argument('--disk',
nargs='?',
required=True,