mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-12 23:23:50 +08:00
CLI: Dedup repos already in groups
This commit is contained in:
parent
53591eff8e
commit
e1a9dcf3d9
1 changed files with 10 additions and 7 deletions
|
|
@ -428,6 +428,8 @@ This is free software, and you are welcome to redistribute it under certain cond
|
||||||
level="error",
|
level="error",
|
||||||
)
|
)
|
||||||
sys.exit(74)
|
sys.exit(74)
|
||||||
|
# Cheap duplicate filter
|
||||||
|
repos_and_group_repos = list(set(repos_and_group_repos))
|
||||||
|
|
||||||
# Single repo usage
|
# Single repo usage
|
||||||
if len(repos_and_group_repos) == 1:
|
if len(repos_and_group_repos) == 1:
|
||||||
|
|
@ -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 len(repos_and_group_repos) > 1:
|
||||||
if cli_args["operation"] not in possible_group_ops:
|
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)}",
|
f"Invalid group operation {cli_args['operation']}. Valid operations are {','.join(possible_group_ops)}",
|
||||||
"critical"
|
"critical",
|
||||||
)
|
)
|
||||||
sys.exit(74)
|
sys.exit(74)
|
||||||
repo_config_list = []
|
repo_config_list = []
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue