From 5f233f3e2168641c5f991baffc3c7f74a21037f1 Mon Sep 17 00:00:00 2001 From: Tan Jiang Date: Wed, 12 Jul 2017 15:05:27 +0800 Subject: [PATCH] address comment --- src/common/dao/clair/base.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/dao/clair/base.go b/src/common/dao/clair/base.go index ca67aaa9c..9f952af4f 100644 --- a/src/common/dao/clair/base.go +++ b/src/common/dao/clair/base.go @@ -65,5 +65,9 @@ func GetLastUpdate() (int64, error) { } return res, nil } + if num > 1 { + return 0, fmt.Errorf("Multiple entries for %s in Clair DB", updaterLast) + } + //num is zero, it's not updated yet. return 0, nil }