diff options
author | 2019-02-20 14:37:38 -0800 | |
---|---|---|
committer | 2019-02-20 14:37:38 -0800 | |
commit | 418f3dd3c2c2abad419246dfb1c851a85b5c3e8c (patch) | |
tree | eba7375df90741a6c493a422c2ba2429970d0c8a | |
parent | f140673ae067209fb559fcc191ef8b9d11236623 (diff) | |
download | srtool-418f3dd3c2c2abad419246dfb1c851a85b5c3e8c.tar.gz srtool-418f3dd3c2c2abad419246dfb1c851a85b5c3e8c.tar.bz2 srtool-418f3dd3c2c2abad419246dfb1c851a85b5c3e8c.zip |
srtool_common: fix package updates
Fix a misplaced ')' in the updated package registration code.
Signed-off-by: David Reyna <David.Reyna@windriver.com>
-rwxr-xr-x | bin/common/srtool_common.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/common/srtool_common.py b/bin/common/srtool_common.py index 66e980af..13b5893d 100755 --- a/bin/common/srtool_common.py +++ b/bin/common/srtool_common.py @@ -165,6 +165,8 @@ def init_package_keywords(filename): recommends = [] +import traceback + #generates importance score based on key-words in description of CVE, higher indicates more important def compute_recommends(cve): recommend = 0 @@ -200,6 +202,8 @@ def compute_recommends(cve): total += weight except Exception as e: print("ERROR:%s|%s|%s" % (key, description,e)) + traceback.print_stack() + exit(1) # set filter maximums if total < -3: @@ -248,7 +252,7 @@ def attach_packages(cur, cve, recommend_list): # Create Package if verbose: print("INSERTING PACKAGE for %s,%s" % (cve[ORM.CVE_NAME],pkg_name)) sql = '''INSERT INTO orm_package (mode, name, realname, invalidname, weight, cve_count, vulnerability_count, investigation_count,defect_count ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)''' - cur.execute(sql, (mode, pkg_name, pkg_name, '', 1 if FOR==mode else -1),0,0,0,0) + cur.execute(sql, (mode, pkg_name, pkg_name, '', 1 if FOR==mode else -1,0,0,0,0,)) pkg_id = cur.lastrowid # Also create Package2CVE sql = "SELECT * FROM orm_packagetocve where package_id = '%s' AND cve_id = '%s';" % (pkg_id,cve_id) |