From 35da0d4977f217be6aefb24ab062b646d17de671 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Wed, 14 Dec 2016 12:31:12 +1100 Subject: [PATCH 1/2] import: elpa: Fix call-with-downloaded-file * guix/import/elpa.scm (call-with-downloaded-file): Make function behaviour match documentation string. --- guix/import/elpa.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 320a09e8c..ec232cd8a 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -89,7 +89,13 @@ NAMES (strings)." "Fetch URL, store the content in a temporary file and call PROC with that file. Returns the value returned by PROC. On error call ERROR-THUNK and return its value or leave if it's false." - (proc (http-fetch/cached (string->uri url)))) + (catch #t + (lambda () + (proc (http-fetch/cached (string->uri url)))) + (lambda (key . args) + (if error-thunk + (error-thunk) + (leave (_ "~A: download failed~%") url))))) (define (is-elpa-package? name elpa-pkg-spec) "Return true if the string NAME corresponds to the name of the package -- 2.11.0