From cbd4adcdf3b27fc157df526fcdcbac8d6b74bb81 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 17 Jan 2022 13:10:33 +0000 Subject: internal/pipeline: if a graph cannot be created, don't leave an empty graph.png file, and allow failure to download that as it won't be created in the case of a 1 page book, which is fine --- internal/pipeline/get.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/pipeline/get.go') diff --git a/internal/pipeline/get.go b/internal/pipeline/get.go index 5e43c2b..de4ac3b 100644 --- a/internal/pipeline/get.go +++ b/internal/pipeline/get.go @@ -90,7 +90,8 @@ func DownloadAnalyses(dir string, name string, conn Downloader) error { key := filepath.Join(name, a) fn := filepath.Join(dir, a) err := conn.Download(conn.WIPStorageId(), key, fn) - if err != nil { + // ignore errors with graph.png, as it will not exist in the case of a 1 page book + if err != nil && a != "graph.png" { return fmt.Errorf("Failed to download analysis file %s: %v", key, err) } } -- cgit v1.2.1-24-ge1ad