2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-24 18:41:55 +00:00

Add fallback if timedatectl can't run.

This commit is contained in:
Jarrod Johnson 2024-05-30 08:14:58 -04:00
parent bab0a77cb6
commit bb414524ad

View File

@ -378,6 +378,8 @@ def handle_request(env, start_response):
tdc = util.run(['timedatectl'])[0].split(b'\n')
except subprocess.CalledProcessError:
tdc = []
currtzvintage = time.time()
ncfg['timezone'] = currtz
for ent in tdc:
ent = ent.strip()
if ent.startswith(b'Time zone:'):