mirror of
https://github.com/xcat2/confluent.git
synced 2025-08-27 21:40:51 +00:00
Fall back if timedatectl doesn't work
This commit is contained in:
@@ -235,7 +235,10 @@ def handle_request(env, start_response):
|
||||
if ckeymap == 'n/a':
|
||||
continue
|
||||
keymap = ckeymap
|
||||
tdc = util.run(['timedatectl'])[0].split(b'\n')
|
||||
try:
|
||||
tdc = util.run(['timedatectl'])[0].split(b'\n')
|
||||
except subprocess.CalledProcessError:
|
||||
tdc = []
|
||||
for ent in tdc:
|
||||
ent = ent.strip()
|
||||
if ent.startswith(b'Time zone:'):
|
||||
|
Reference in New Issue
Block a user