From 70abcdc17b1a91582708133dcf0491e9549dce9c Mon Sep 17 00:00:00 2001 From: Michael Auchter Date: Tue, 20 Apr 2021 10:06:23 -0500 Subject: mpm: check-filesystem: liberalize version check check-filesystem assumed that UHD's version string always had the format of --. However, this is not always the case; see ./host/cmake/Modules/UHDVersion.cmake for more details. Instead of trying to parse the version string into components, just check to make sure the version and git hash are present in the version string. --- mpm/python/usrp_mpm/sys_utils/filesystem_status.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'mpm/python/usrp_mpm/sys_utils') diff --git a/mpm/python/usrp_mpm/sys_utils/filesystem_status.py b/mpm/python/usrp_mpm/sys_utils/filesystem_status.py index b9617cf0a..3b7655a66 100644 --- a/mpm/python/usrp_mpm/sys_utils/filesystem_status.py +++ b/mpm/python/usrp_mpm/sys_utils/filesystem_status.py @@ -13,18 +13,9 @@ import subprocess import time def get_uhd_version(filesystem_root='/'): - def parse_uhd_version(versionstring): - assert(versionstring[0:4] == 'UHD ') - array = versionstring[4:].split('-') - assert(len(array) == 3) - return { - 'version': array[0], - 'appendix': array[1], - 'githash': array[2], - } file = pathlib.Path(filesystem_root, 'usr/bin/uhd_config_info') versionstring = subprocess.check_output([file, '--version']).decode('utf-8').splitlines()[0] - return parse_uhd_version(versionstring) + return versionstring def get_mender_artifact(filesystem_root='/', parse_manually=False): def parse_artifact(output): -- cgit v1.2.3