summaryrefslogtreecommitdiff
path: root/kvmd/apps/htpasswd/__init__.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-04-09 07:13:13 +0300
committerDevaev Maxim <[email protected]>2019-04-09 07:13:13 +0300
commita6028c46a46fc06c8865679b8c922bfcd2852ab0 (patch)
tree106fde0b0f96f2ec3d27f6172c514791c619d306 /kvmd/apps/htpasswd/__init__.py
parent0460c2e83be9837fab01b116402d54c6b32ee4e4 (diff)
auth plugins
Diffstat (limited to 'kvmd/apps/htpasswd/__init__.py')
-rw-r--r--kvmd/apps/htpasswd/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/apps/htpasswd/__init__.py b/kvmd/apps/htpasswd/__init__.py
index 486f00e4..a223fc16 100644
--- a/kvmd/apps/htpasswd/__init__.py
+++ b/kvmd/apps/htpasswd/__init__.py
@@ -44,9 +44,9 @@ from .. import init
# =====
def _get_htpasswd_path(config: Section) -> str:
- if config.kvmd.auth.type != "htpasswd":
- print("Warning: KVMD does not use htpasswd auth", file=sys.stderr)
- return config.kvmd.auth.htpasswd.file
+ if config.kvmd.auth.internal_type != "htpasswd":
+ raise SystemExit("Error: KVMD internal auth not using 'htpasswd' (now configured %r)" % (config.kvmd.auth.internal_type))
+ return config.kvmd.auth.internal.file
@contextlib.contextmanager