File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
44
55import locale
6+ import logging
67import os
78import platform
89import subprocess
1112from odoo import release
1213from odoo .tools .config import config
1314
15+ _logger = logging .getLogger (__name__ )
16+
1417
1518def _get_output (cmd ):
1619 bindir = config ["root_path" ]
@@ -34,10 +37,12 @@ def get_server_environment():
3437 os_lang = "." .join ([x for x in locale .getlocale () if x ])
3538 if not os_lang :
3639 os_lang = "NOT SET"
40+ lsbinfo = "not lsb compliant"
3741 if os .name == "posix" and platform .system () == "Linux" :
38- lsbinfo = _get_output ("lsb_release -a" )
39- else :
40- lsbinfo = "not lsb compliant"
42+ try :
43+ lsbinfo = _get_output ("lsb_release -a" )
44+ except Exception :
45+ _logger .info ("lsb_release not compliant" )
4146 return (
4247 ("platform" , platform .platform ()),
4348 ("os.name" , os .name ),
You can’t perform that action at this time.
0 commit comments