[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: import: elpa: Fix call-with-downloaded-file

From: Ludovic Courtès
Subject: 01/03: import: elpa: Fix call-with-downloaded-file
Date: Thu, 29 Dec 2016 17:23:07 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 36225d4feff2f5582c05239b49433627997d2f2a
Author: Carlo Zancanaro <address@hidden>
Date:   Wed Dec 14 12:31:12 2016 +1100

    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 <address@hidden>
 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 320a09e..ec232cd 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]