fix(report): record not found on reporting with OVAL #679 (#680)

* fix(report): record not found on reporting with OVAL #679

* lock go version in .travis.yml
This commit is contained in:
Kota Kanbe
2018-07-10 15:14:35 +09:00
committed by GitHub
parent 9e9370b178
commit 81f2ba8a46
5 changed files with 101 additions and 62 deletions

View File

@@ -32,7 +32,6 @@ import (
debver "github.com/knqyf263/go-deb-version"
rpmver "github.com/knqyf263/go-rpm-version"
"github.com/kotakanbe/goval-dictionary/db"
ovallog "github.com/kotakanbe/goval-dictionary/log"
ovalmodels "github.com/kotakanbe/goval-dictionary/models"
"github.com/parnurzeal/gorequest"
)
@@ -218,7 +217,6 @@ func httpGet(url string, req request, resChan chan<- response, errChan chan<- er
}
func getDefsByPackNameFromOvalDB(r *models.ScanResult) (relatedDefs ovalResult, err error) {
ovallog.Initialize(config.Conf.LogDir)
path := config.Conf.OvalDBURL
if config.Conf.OvalDBType == "sqlite3" {
path = config.Conf.OvalDBPath
@@ -226,7 +224,7 @@ func getDefsByPackNameFromOvalDB(r *models.ScanResult) (relatedDefs ovalResult,
util.Log.Debugf("Open oval-dictionary db (%s): %s", config.Conf.OvalDBType, path)
var ovaldb db.DB
if ovaldb, err = db.NewDB(r.Family, config.Conf.OvalDBType,
if ovaldb, _, err = db.NewDB(r.Family, config.Conf.OvalDBType,
path, config.Conf.DebugSQL); err != nil {
return
}