mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-16 00:17:22 +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]:
|
||||
if full_config:
|
||||
return list(full_config.g("repos").keys())
|
||||
try:
|
||||
return list(full_config.g("repos").keys())
|
||||
except AttributeError:
|
||||
pass
|
||||
return []
|
||||
|
||||
|
||||
def get_group_list(full_config: dict) -> List[str]:
|
||||
if full_config:
|
||||
return list(full_config.g("groups").keys())
|
||||
try:
|
||||
return list(full_config.g("groups").keys())
|
||||
except AttributeError:
|
||||
pass
|
||||
return []
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue