summaryrefslogtreecommitdiffstats
path: root/cli/objects/disks.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/disks.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/disks.py')
-rw-r--r--cli/objects/disks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/objects/disks.py b/cli/objects/disks.py
index 4df9994..d1a9ed7 100644
--- a/cli/objects/disks.py
+++ b/cli/objects/disks.py
@@ -15,7 +15,7 @@ class OgDisk():
@staticmethod
def list_disks(rest, args):
- parser = argparse.ArgumentParser()
+ parser = argparse.ArgumentParser(prog='ogcli list disks')
parser.add_argument('--client-ip',
nargs='?',
required=True,
@@ -44,7 +44,7 @@ class OgDisk():
part_types = ['LINUX', 'EFI', 'WINDOWS', 'CACHE']
fs_types = ['EXT4', 'FAT32', 'NTFS', 'CACHE']
- parser = argparse.ArgumentParser()
+ parser = argparse.ArgumentParser(prog='ogcli setup disk')
parser.add_argument('--type',
nargs='?',
required=True,