guix-commits
[Top][All Lists]
Advanced

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

03/04: ftp-client: Throw when log-in fails.


From: Ludovic Courtès
Subject: 03/04: ftp-client: Throw when log-in fails.
Date: Wed, 20 May 2015 10:14:11 +0000

civodul pushed a commit to branch master
in repository guix.

commit 820a40327dfd075f03c8cbe336f955f45e3e60ef
Author: Ludovic Courtès <address@hidden>
Date:   Wed May 20 12:00:04 2015 +0200

    ftp-client: Throw when log-in fails.
    
    * guix/ftp-client.scm (ftp-open): When '%ftp-listen' returns something
      different from 220, throw instead of writing an error message.
---
 guix/ftp-client.scm |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm
index ab72405..37feb89 100644
--- a/guix/ftp-client.scm
+++ b/guix/ftp-client.scm
@@ -109,11 +109,8 @@ or a TCP port number), and return it."
                   (%ftp-login "anonymous" "address@hidden" s)
                   (%make-ftp-connection s ai))
                 (begin
-                  (format (current-error-port)
-                          "FTP to `~a' failed: ~A: ~A~%"
-                          host code message)
                   (close s)
-                  #f))))
+                  (throw 'ftp-error s "log-in" code message)))))
 
         (lambda args
           ;; Connection failed, so try one of the other addresses.



reply via email to

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