From 46920e8436e8becaa6f730de001a9e795eb58f49 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 7 Sep 2026 05:18:43 +0200 Subject: [PATCH] Keep the defaults when localectl reports nothing set Newer systemd prints '(unset)' where it used to print 'n/a', so an unset console keymap was handed to the installer verbatim. An unset System Locale has no '=' either, and the whole line was being taken as the locale. --- confluent_server/confluent/selfservice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index 9960646c..e65d91a4 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -367,12 +367,14 @@ async def handle_request(req, make_response, mimetype): for line in langinfo: line = line.strip() if line.startswith(b'System Locale:'): + if b'=' not in line: + continue ccurrlocale = line.split(b'=')[-1] if not ccurrlocale: continue if not isinstance(ccurrlocale, str): ccurrlocale = ccurrlocale.decode('utf8') - if ccurrlocale == 'n/a': + if ccurrlocale in ('n/a', '(unset)'): continue currlocale = ccurrlocale elif line.startswith(b'VC Keymap:'): @@ -382,7 +384,7 @@ async def handle_request(req, make_response, mimetype): continue if not isinstance(ckeymap, str): ckeymap = ckeymap.decode('utf8') - if ckeymap == 'n/a': + if ckeymap in ('n/a', '(unset)'): continue keymap = ckeymap try: