guix-commits
[Top][All Lists]
Advanced

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

03/06: substitute: Remove dead code.


From: Ludovic Courtès
Subject: 03/06: substitute: Remove dead code.
Date: Mon, 14 Mar 2016 22:35:10 +0000

civodul pushed a commit to branch master
in repository guix.

commit cc27dbcf4af86bb073f1184e6186b2db96a479aa
Author: Ludovic Courtès <address@hidden>
Date:   Mon Mar 14 17:09:46 2016 +0100

    substitute: Remove dead code.
    
    This parameter became unused with the switch to HTTP pipelining in
    commit d3a652037ef879f9279bc056c43d15ba7afcbb25.
    
    * guix/scripts/substitute.scm (fetch): Remove #:quiet-404? and adjust
    accordingly.
---
 guix/scripts/substitute.scm |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index b057e9b..d20c82a 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -164,10 +164,9 @@ again."
         (sigaction SIGALRM SIG_DFL)
         (apply values result)))))
 
-(define* (fetch uri #:key (buffered? #t) (timeout? #t) (quiet-404? #f))
+(define* (fetch uri #:key (buffered? #t) (timeout? #t))
   "Return a binary input port to URI and the number of bytes it's expected to
-provide.  If QUIET-404? is true, HTTP 404 error conditions are passed through
-to the caller without emitting an error message."
+provide."
   (case (uri-scheme uri)
     ((file)
      (let ((port (open-file (uri-path uri)
@@ -175,12 +174,10 @@ to the caller without emitting an error message."
        (values port (stat:size (stat port)))))
     ((http https)
      (guard (c ((http-get-error? c)
-                (let ((code (http-get-error-code c)))
-                  (if (and (= code 404) quiet-404?)
-                      (raise c)
-                      (leave (_ "download from '~a' failed: ~a, ~s~%")
-                             (uri->string (http-get-error-uri c))
-                             code (http-get-error-reason c))))))
+                (leave (_ "download from '~a' failed: ~a, ~s~%")
+                       (uri->string (http-get-error-uri c))
+                       (http-get-error-code c)
+                       (http-get-error-reason c))))
        ;; Test this with:
        ;;   sudo tc qdisc add dev eth0 root netem delay 1500ms
        ;; and then cancel with:



reply via email to

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