[IMP] script check_addons_exist.py: argument output_path

- output the real path if module exist from configuration
This commit is contained in:
Mathieu Benoit 2024-01-05 01:52:52 -05:00
parent f972acbc80
commit c172c77159

View file

@ -43,6 +43,11 @@ def get_config():
action="store_true",
help="Enable debug output",
)
parser.add_argument(
"--output_path",
action="store_true",
help="Print path if module exist",
)
args = parser.parse_args()
return args
@ -97,10 +102,15 @@ def main():
)
if dct_module_exist:
for key, lst_value in dct_module_exist.items():
is_print_value = False
if len(lst_value) != 1:
is_print_value = True
is_good = False
module_list = "'" + "', '".join(lst_value) + "'"
_logger.error(f"Conflict modules: {module_list}")
elif lst_value and config.output_path:
is_print_value = True
if is_print_value:
for value in lst_value:
print(value)