From 882df3d42947ff2165d2d0797cd93542f138bb19 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 18 Dec 2015 11:33:50 -0800 Subject: [PATCH] downloadTargets should continue on ErrMissingMeta, not ErrMetaNotFound. ErrMetaNotFoudn will ocurr when we expect to find the data and don't. ErrMissingMeta indicates it's not in the snapshot and that's OK for targets delegations (technically it's OK for the targets role too, indicating simply an empty repository with lazy targets file creation). Signed-off-by: David Lawrence (github: endophage) --- tuf/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuf/client/client.go b/tuf/client/client.go index 26e85d5d9d..3eaffdddbf 100644 --- a/tuf/client/client.go +++ b/tuf/client/client.go @@ -393,7 +393,7 @@ func (c *Client) downloadTargets(role string) error { keyIDs := r.KeyIDs s, err := c.getTargetsFile(role, keyIDs, snap.Meta, root.ConsistentSnapshot, r.Threshold) if err != nil { - if _, ok := err.(store.ErrMetaNotFound); ok { + if _, ok := err.(store.ErrMissingMeta); ok { // if the role meta hasn't been published, // that's ok, continue continue