From d00fe415387ef8bb82665bf1684be915efe51428 Mon Sep 17 00:00:00 2001 From: madec Date: Wed, 3 Jun 2026 14:34:06 +0200 Subject: [PATCH] [19.0][FIX] server_environment lsb_release unavailable --- server_environment/system_info.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server_environment/system_info.py b/server_environment/system_info.py index 741a3a754..0a7f0426b 100644 --- a/server_environment/system_info.py +++ b/server_environment/system_info.py @@ -3,6 +3,7 @@ # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) import locale +import logging import os import platform import subprocess @@ -11,6 +12,8 @@ from odoo import release from odoo.tools.config import config +_logger = logging.getLogger(__name__) + def _get_output(cmd): bindir = config.root_path @@ -34,10 +37,12 @@ def get_server_environment(): os_lang = ".".join([x for x in locale.getlocale() if x]) if not os_lang: os_lang = "NOT SET" + lsbinfo = "not lsb compliant" if os.name == "posix" and platform.system() == "Linux": - lsbinfo = _get_output("lsb_release -a") - else: - lsbinfo = "not lsb compliant" + try: + lsbinfo = _get_output("lsb_release -a") + except Exception: + _logger.info("lsb_release not compliant") return ( ("platform", platform.platform()), ("os.name", os.name),