mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-16 16:37:56 +08:00
Group absence should not trigger an error
This commit is contained in:
parent
2742338148
commit
08dcc8f50f
1 changed files with 8 additions and 2 deletions
|
@ -833,13 +833,19 @@ def save_config(config_file: Path, full_config: dict) -> bool:
|
||||||
|
|
||||||
def get_repo_list(full_config: dict) -> List[str]:
|
def get_repo_list(full_config: dict) -> List[str]:
|
||||||
if full_config:
|
if full_config:
|
||||||
|
try:
|
||||||
return list(full_config.g("repos").keys())
|
return list(full_config.g("repos").keys())
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
def get_group_list(full_config: dict) -> List[str]:
|
def get_group_list(full_config: dict) -> List[str]:
|
||||||
if full_config:
|
if full_config:
|
||||||
|
try:
|
||||||
return list(full_config.g("groups").keys())
|
return list(full_config.g("groups").keys())
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue