Skip to content

Commit 76dbfe0

Browse files
committed
handle ubuntu versioning without patch release
1 parent 7b8d3ed commit 76dbfe0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reports/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,8 @@ def get_os(os, arch):
611611
lts = ''
612612
if 'LTS' in os:
613613
lts = ' LTS'
614-
major, minor, patch = os.split(' ')[1].split('.')
614+
os_ver = os.split(' ')[1].split('.')
615+
major, minor = os_ver[0], os_ver[1]
615616
ubuntu_version = f'{major}_{minor}'
616617
osrelease_name = f'Ubuntu {major}.{minor}{lts}'
617618
cpe_name = f"cpe:2.3:o:canonical:ubuntu_linux:{ubuntu_version}:*:*:*:{'lts' if lts else '*'}:*:*:*"

0 commit comments

Comments
 (0)