mirror of https://git.48k.eu/ogclient
utils: sw_inventory: report unknown OS for software inventory
Users can create an image of a filesystem that contains no OS, therefore, instead of rising an exception when no OS is detected, deliver a "unknown" OS and an empty list of software.master v1.3.2-2
parent
4e10c46563
commit
d34ef0ab25
|
@ -126,6 +126,7 @@ def get_package_set(mountpoint):
|
|||
pkgset = _get_package_set_dpkg(dpkg_status_path)
|
||||
osname = getlinuxversion(osrelease)
|
||||
else:
|
||||
raise ValueError(f'Cannot fetch software inventory at {mountpoint}')
|
||||
pkgset = set()
|
||||
osname = "unknown"
|
||||
# Legacy software inventory first element is the OS name
|
||||
return [osname] + list(pkgset)
|
||||
|
|
Loading…
Reference in New Issue