mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-17 11:10:23 +00:00
email: postconf: Handle postconf returning an empty key
However, if /sbin/postconf complained, a KeyError will be raised
This commit is contained in:
parent
aab3fe9c02
commit
573287cf28
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user