mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-12 13:35:47 +00:00
report support, readme
This commit is contained in:
@ -20,7 +20,9 @@
|
||||
import subprocess
|
||||
|
||||
from logging import Logger
|
||||
from typing import Optional
|
||||
from typing import List, Optional
|
||||
|
||||
from ahriman.core.configuration import Configuration
|
||||
|
||||
|
||||
def check_output(*args: str, exception: Optional[Exception],
|
||||
@ -36,4 +38,11 @@ def check_output(*args: str, exception: Optional[Exception],
|
||||
for line in e.output.decode('utf8').splitlines():
|
||||
logger.debug(line)
|
||||
raise exception or e
|
||||
return result
|
||||
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()
|
Reference in New Issue
Block a user