diff --git a/npbackup/__main__.py b/npbackup/__main__.py index 0dc0501..073fd18 100644 --- a/npbackup/__main__.py +++ b/npbackup/__main__.py @@ -428,6 +428,8 @@ This is free software, and you are welcome to redistribute it under certain cond level="error", ) sys.exit(74) + # Cheap duplicate filter + repos_and_group_repos = list(set(repos_and_group_repos)) # Single repo usage if len(repos_and_group_repos) == 1: @@ -683,15 +685,15 @@ This is free software, and you are welcome to redistribute it under certain cond "policy", "housekeeping", "check", - "quick_check", # TODO: deprecated - "full_check", # TODO: deprecated + "quick_check", # TODO: deprecated + "full_check", # TODO: deprecated "prune", "prune_max", "unlock", "repair", - "repair_index", # TODO: deprecated - "repair_packs", # TODO: deprecated - "repair_snapshots", # TODO: deprecated + "repair_index", # TODO: deprecated + "repair_packs", # TODO: deprecated + "repair_snapshots", # TODO: deprecated "recover", "dump", "stats", @@ -700,9 +702,10 @@ This is free software, and you are welcome to redistribute it under certain cond ) if len(repos_and_group_repos) > 1: if cli_args["operation"] not in possible_group_ops: - json_error_logging(False, + json_error_logging( + False, f"Invalid group operation {cli_args['operation']}. Valid operations are {','.join(possible_group_ops)}", - "critical" + "critical", ) sys.exit(74) repo_config_list = []