summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-30 12:03:10 +0300
committerDevaev Maxim <[email protected]>2020-09-30 12:21:30 +0300
commiteeedb6025a4ede0d301b0b5356d13d14290e11b1 (patch)
treede3271c80040f34fc14e5b8376d4f7af2c31138d /kvmd
parente94a105bf50a77b2dabbe08255fc5f2166296460 (diff)
Check config toplevel
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/apps/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py
index 038441f2..f301e7d5 100644
--- a/kvmd/apps/__init__.py
+++ b/kvmd/apps/__init__.py
@@ -140,6 +140,8 @@ def init(
def _init_config(config_path: str, override_options: List[str], **load_flags: bool) -> Section:
config_path = os.path.expanduser(config_path)
raw_config: Dict = load_yaml_file(config_path)
+ if not isinstance(raw_config, dict):
+ raise SystemExit(f"Config error: Top-level of the file {config_path!r} must be a dictionary")
scheme = _get_config_scheme()
try: