From ed4adfefe6084b442acd8361f53341cb870844ba Mon Sep 17 00:00:00 2001 From: Anokhov Date: Tue, 3 Sep 2024 15:10:53 +0200 Subject: [PATCH] arg_parser: Bandit scan fix --- utils/arg_parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/arg_parser.py b/utils/arg_parser.py index 1de43b30..41e2afac 100644 --- a/utils/arg_parser.py +++ b/utils/arg_parser.py @@ -288,7 +288,9 @@ def add_dist_args(cls, parser: argparse.ArgumentParser): def fail_if_product_version_not_supported(product_version: str, parser: DockerCIArgumentParser): - if product_version < "2022.1": + if product_version is None: + parser.error("Product version is not specified.") + elif product_version < "2022.1": parser.error( f"This version of the DockerHub CI framework does not support OpenVINO releases earlier than " '2022.1.0. Current detected product version "{product_version}". Please use previous versions '