guix-commits
[Top][All Lists]
Advanced

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

02/04: guix build: Catch 'getaddrinfo-error' for '--log-file'.


From: Ludovic Courtès
Subject: 02/04: guix build: Catch 'getaddrinfo-error' for '--log-file'.
Date: Sat, 14 May 2016 20:14:19 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit c22a475725b99463de6e163a212c9398116c8aa0
Author: Ludovic Courtès <address@hidden>
Date:   Sat May 14 16:56:21 2016 +0200

    guix build: Catch 'getaddrinfo-error' for '--log-file'.
    
    * guix/scripts/build.scm (log-url)[valid-url?]: Catch
    'getaddrinfo-error'.
---
 guix/scripts/build.scm |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index c38ffe6..a02a0d5 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -65,9 +65,13 @@
 found.  Return #f if no build log was found."
   (define (valid-url? url)
     ;; Probe URL and return #t if it is accessible.
-    (guard (c ((http-get-error? c) #f))
-      (close-port (http-fetch url #:buffered? #f))
-      #t))
+    (catch 'getaddrinfo-error
+      (lambda ()
+        (guard (c ((http-get-error? c) #f))
+          (close-port (http-fetch url #:buffered? #f))
+          #t))
+      (lambda _
+        #f)))
 
   (define (find-url file)
     (let ((base (basename file)))



reply via email to

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