Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions server_environment/system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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),
Expand Down
Loading