From bec080ec90aa6aee717f30a9025fec3264bc9115 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Thu, 18 Nov 2021 09:38:48 -0500 Subject: [PATCH] datetime: Avoid error when systemctl is not available This situation happens when building the package with cowbuilder. Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- plinth/modules/datetime/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/datetime/__init__.py b/plinth/modules/datetime/__init__.py index 486d2ad9a..7110aedd5 100644 --- a/plinth/modules/datetime/__init__.py +++ b/plinth/modules/datetime/__init__.py @@ -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