From 722f55465e23d639d8a0ce051d7ece6d57296b5b Mon Sep 17 00:00:00 2001 From: madec Date: Wed, 3 Jun 2026 14:29:33 +0200 Subject: [PATCH] [17.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 9b303e849..a444b6dfc 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),