Skip to content

Commit

Permalink
clean up parsing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
furlongm committed Feb 18, 2021
1 parent 0337215 commit 6f13dcd
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions reports/utils.py
Expand Up @@ -299,21 +299,17 @@ def process_package(pkg, protocol):
"""
if protocol == '1':
epoch = ver = rel = ''
name = pkg[0]

if pkg[4] != '':
arch = pkg[4]
else:
arch = 'unknown'
arch = 'unknown'

name = pkg[0]
if pkg[1]:
epoch = pkg[1]

if pkg[2]:
ver = pkg[2]

if pkg[3]:
rel = pkg[3]
if pkg[4]:
arch = pkg[4]

if pkg[5] == 'deb':
p_type = Package.DEB
Expand Down

0 comments on commit 6f13dcd

Please sign in to comment.