def _get_ubuntu_version():
"""
Gets the "major" Ubuntu version.
If an unsupported OS/Ubuntu version is found a warning is printed and
``None`` is returned.
"""
import platform
distname, version, _ = platform.dist()
if distname.lower() != 'ubuntu':
logger.warning('You are running on a non-Ubuntu system. Skipping S2E '
'dependencies - please install them manually')
return None
major_version = int(version.split('.')[0])
if major_version not in CONSTANTS['required_versions']['ubuntu_major_ver']:
logger.warning('You are running an unsupported version of Ubuntu. '
'Skipping S2E dependencies - please install them '
'manually')
return None
return major_version
评论列表
文章目录