From 016ee3ecb015d5385fb95ca3520ab64a44d279ba Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 15 Dec 2021 12:34:28 -0500 Subject: [PATCH] Fall back if timedatectl doesn't work --- confluent_server/confluent/selfservice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index e2661398..a538e162 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -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:'):