From 573287cf287907610f5c8514600a5bc70f7c6457 Mon Sep 17 00:00:00 2001 From: fliu <10025-fliu@users.noreply.salsa.debian.org> Date: Mon, 5 Jul 2021 23:30:09 +0000 Subject: [PATCH] email: postconf: Handle postconf returning an empty key However, if /sbin/postconf complained, a KeyError will be raised --- plinth/modules/email_server/postconf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/email_server/postconf.py b/plinth/modules/email_server/postconf.py index 59b80d19a..4762bd522 100644 --- a/plinth/modules/email_server/postconf.py +++ b/plinth/modules/email_server/postconf.py @@ -71,7 +71,7 @@ def set_master_cf_options(service_flags, options): def get_unsafe(key): """Get postconf value (no locking, no sanitization)""" result = _run(['/sbin/postconf', key]) - match = key + ' = ' + match = key + ' =' if not result.startswith(match): raise KeyError(key) return result[len(match):].strip()