mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 02:52:07 +00:00
Fall back if timedatectl doesn't work
This commit is contained in:
parent
48ea6225aa
commit
016ee3ecb0
@ -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:'):
|
||||
|
Loading…
Reference in New Issue
Block a user