From 569b0107c1d81f9a632e9f8c461b1911c0a15742 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Mon, 5 Feb 2024 13:27:31 +0100 Subject: ogcli: validate integer type in every --id argument missing validation of --id, user needs to supply an integer --- cli/objects/repo.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cli/objects/repo.py') diff --git a/cli/objects/repo.py b/cli/objects/repo.py index c586768..c287926 100644 --- a/cli/objects/repo.py +++ b/cli/objects/repo.py @@ -45,6 +45,7 @@ class OgRepo(): def delete_repo(rest, args): parser = argparse.ArgumentParser(prog='ogcli delete repo') parser.add_argument('--id', + type=int, nargs='?', required=True, help='repo id (list repos using "ogcli list repos")') @@ -56,6 +57,7 @@ class OgRepo(): def set_repo(rest, args): parser = argparse.ArgumentParser(prog='ogcli set repo') parser.add_argument('--id', + type=int, nargs='?', required=True, help='repo id (list repos using "ogcli list repos")') -- cgit v1.2.3-18-g5258