mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-23 01:53:28 +00:00
Default to US if management node is n/a
localectl can be n/a for some scenarios, default to US for such cases.
This commit is contained in:
parent
17b8000c0f
commit
335d06ea4c
@ -93,6 +93,8 @@ def handle_request(env, start_response):
|
||||
continue
|
||||
if not isinstance(ccurrlocale, str):
|
||||
ccurrlocale = ccurrlocale.decode('utf8')
|
||||
if ccurrlocale == 'n/a':
|
||||
continue
|
||||
currlocale = ccurrlocale
|
||||
elif line.startswith(b'VC Keymap:'):
|
||||
ckeymap = line.split(b':')[-1]
|
||||
@ -101,6 +103,8 @@ def handle_request(env, start_response):
|
||||
continue
|
||||
if not isinstance(ckeymap, str):
|
||||
ckeymap = ckeymap.decode('utf8')
|
||||
if ckeymap == 'n/a':
|
||||
continue
|
||||
keymap = ckeymap
|
||||
tdc = subprocess.check_output(['timedatectl']).split(b'\n')
|
||||
for ent in tdc:
|
||||
|
Loading…
Reference in New Issue
Block a user