Group absence should not trigger an error

This commit is contained in:
Orsiris de Jong 2024-05-15 10:42:04 +02:00
parent 2742338148
commit 08dcc8f50f

View file

@ -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 []