summaryrefslogtreecommitdiffstats
path: root/cli/objects/server.py
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-02-05 13:27:31 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-02-05 13:29:57 +0100
commit569b0107c1d81f9a632e9f8c461b1911c0a15742 (patch)
tree6d4cd5cc948155059dc929879d530a6bef7df817 /cli/objects/server.py
parent4881610656dbc322804ca6eba1c8d5922cd8ac09 (diff)
ogcli: validate integer type in every --id argument
missing validation of --id, user needs to supply an integer
Diffstat (limited to 'cli/objects/server.py')
-rw-r--r--cli/objects/server.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/objects/server.py b/cli/objects/server.py
index 25b545a..38cc6b0 100644
--- a/cli/objects/server.py
+++ b/cli/objects/server.py
@@ -31,6 +31,7 @@ class OgServer():
def delete_server(rest, args):
parser = argparse.ArgumentParser(prog='ogcli delete server')
parser.add_argument('--id',
+ type=int,
nargs='?',
required=True,
help='server id in the database')
@@ -42,6 +43,7 @@ class OgServer():
def set_server(rest, args):
parser = argparse.ArgumentParser(prog='ogcli set server')
parser.add_argument('--id',
+ type=int,
nargs='?',
required=True,
help='server id in the database')