diff mbox series

[bug#45409,v5,03/14] substitute: Remove redundant let block from fetch.

Message ID 20210213134719.19625-3-mail@cbaines.net
State Accepted
Headers show
Series [bug#45409,v5,01/14] substitute: Remove buffer handling from fetch. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Christopher Baines Feb. 13, 2021, 1:47 p.m. UTC
* guix/scripts/substitute.scm (fetch): Remove redundant let block.
---
 guix/scripts/substitute.scm | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 323957910a..f01892776e 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -192,18 +192,17 @@  connection (typically PORT) is kept open once data has been fetched from URI."
        ;;   sudo tc qdisc add dev eth0 root netem delay 1500ms
        ;; and then cancel with:
        ;;   sudo tc qdisc del dev eth0 root
-       (let ((port port))
-         (with-timeout (if timeout?
-                           %fetch-timeout
-                           0)
-           (begin
-             (warning (G_ "while fetching ~a: server is somewhat slow~%")
-                      (uri->string uri))
-             (warning (G_ "try `--no-substitutes' if the problem persists~%")))
-           (http-fetch uri #:text? #f #:port port
-                       #:keep-alive? keep-alive?
-                       #:buffered? buffered?
-                       #:verify-certificate? #f)))))
+       (with-timeout (if timeout?
+                         %fetch-timeout
+                         0)
+         (begin
+           (warning (G_ "while fetching ~a: server is somewhat slow~%")
+                    (uri->string uri))
+           (warning (G_ "try `--no-substitutes' if the problem persists~%")))
+         (http-fetch uri #:text? #f #:port port
+                     #:keep-alive? keep-alive?
+                     #:buffered? buffered?
+                     #:verify-certificate? #f))))
     (else
      (leave (G_ "unsupported substitute URI scheme: ~a~%")
             (uri->string uri)))))