clear code, allow to set overrides for each architecture

This commit is contained in:
2021-03-07 15:20:41 +03:00
parent b69076eb18
commit 77db49a379
13 changed files with 85 additions and 73 deletions

View File

@ -20,9 +20,7 @@
import subprocess
from logging import Logger
from typing import List, Optional
from ahriman.core.configuration import Configuration
from typing import Optional
def check_output(*args: str, exception: Optional[Exception],
@ -39,10 +37,3 @@ def check_output(*args: str, exception: Optional[Exception],
logger.debug(line)
raise exception or e
return result
def options_list(config: Configuration, section: str, key: str) -> List[str]:
raw = config.get(section, key, fallback=None)
if not raw: # empty string or none
return []
return raw.split()