aboutsummaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2016-12-14 12:31:12 +1100
committerLudovic Courtès <ludo@gnu.org>2016-12-29 18:22:49 +0100
commit36225d4feff2f5582c05239b49433627997d2f2a (patch)
tree49467ac65036e5526adabb9fbbaf304aa852f6f2 /guix/import
parentd835c6cc4bc343810ec223be3d9879830e782428 (diff)
downloadgnu-guix-36225d4feff2f5582c05239b49433627997d2f2a.tar
gnu-guix-36225d4feff2f5582c05239b49433627997d2f2a.tar.gz
import: elpa: Fix call-with-downloaded-file
* guix/import/elpa.scm (call-with-downloaded-file): Make function behaviour match documentation string. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/elpa.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 320a09e8c6..ec232cd8a3 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