mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-24 10:30:22 +00:00
Add fallback if timedatectl can't run.
This commit is contained in:
parent
bab0a77cb6
commit
bb414524ad
@ -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:'):
|
||||
|
Loading…
Reference in New Issue
Block a user