From fdfa4a5fe62232f65f1dd8d6fe0c500374228788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 21 Oct 2020 11:17:48 +0200 Subject: Allow getJSON errors to be ignored This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing). Fixes #7866 --- tpl/data/resources.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tpl/data/resources.go') diff --git a/tpl/data/resources.go b/tpl/data/resources.go index 923d5946e..a7b8b3f49 100644 --- a/tpl/data/resources.go +++ b/tpl/data/resources.go @@ -45,7 +45,7 @@ func (ns *Namespace) getRemote(cache *filecache.Cache, unmarshal func([]byte) (b var err error handled = true for i := 0; i <= resRetries; i++ { - ns.deps.Log.INFO.Printf("Downloading: %s ...", url) + ns.deps.Log.Infof("Downloading: %s ...", url) var res *http.Response res, err = ns.client.Do(req) if err != nil { @@ -75,8 +75,8 @@ func (ns *Namespace) getRemote(cache *filecache.Cache, unmarshal func([]byte) (b return nil, err } - ns.deps.Log.INFO.Printf("Cannot read remote resource %s: %s", url, err) - ns.deps.Log.INFO.Printf("Retry #%d for %s and sleeping for %s", i+1, url, resSleep) + ns.deps.Log.Infof("Cannot read remote resource %s: %s", url, err) + ns.deps.Log.Infof("Retry #%d for %s and sleeping for %s", i+1, url, resSleep) time.Sleep(resSleep) } -- cgit v1.2.3