mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
datetime: Avoid error when systemctl is not available
This situation happens when building the package with cowbuilder. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
122bda7f7e
commit
bec080ec90
@ -54,7 +54,7 @@ class DateTimeApp(app_module.App):
|
||||
'--value', 'systemd-timesyncd'
|
||||
])
|
||||
self._time_managed = 'yes' in output.decode()
|
||||
except subprocess.CalledProcessError:
|
||||
except (FileNotFoundError, subprocess.CalledProcessError):
|
||||
# When systemd is not running.
|
||||
self._time_managed = False
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user