From b82b4615addbb23e80facebcc83734404d965ebb Mon Sep 17 00:00:00 2001 From: Aniket Singh Rawat Date: Mon, 6 Nov 2023 19:13:20 +0530 Subject: [PATCH 1/2] Added check for empty version string --- retriever/lib/scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retriever/lib/scripts.py b/retriever/lib/scripts.py index 5367eb5ab..32d77e4d6 100644 --- a/retriever/lib/scripts.py +++ b/retriever/lib/scripts.py @@ -29,7 +29,7 @@ def check_retriever_minimum_version(module): m = module.name if hasattr(module, "retriever_minimum_version"): - if not parse_version(VERSION) >= parse_version("{}".format(mod_ver)): + if mod_ver != "" and not parse_version(VERSION) >= parse_version("{}".format(mod_ver)): print("{} is supported by Retriever version " "{}".format(m, mod_ver)) print("Current version is {}".format(VERSION)) From 41540fb1b5ad45e615ef27c1166e0eac26024cab Mon Sep 17 00:00:00 2001 From: Aniket Singh Rawat Date: Thu, 9 Nov 2023 19:50:46 +0530 Subject: [PATCH 2/2] Used .strip() --- retriever/lib/scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retriever/lib/scripts.py b/retriever/lib/scripts.py index 32d77e4d6..2a04e36b6 100644 --- a/retriever/lib/scripts.py +++ b/retriever/lib/scripts.py @@ -29,7 +29,7 @@ def check_retriever_minimum_version(module): m = module.name if hasattr(module, "retriever_minimum_version"): - if mod_ver != "" and not parse_version(VERSION) >= parse_version("{}".format(mod_ver)): + if mod_ver.strip() and not parse_version(VERSION) >= parse_version("{}".format(mod_ver)): print("{} is supported by Retriever version " "{}".format(m, mod_ver)) print("Current version is {}".format(VERSION))