aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-20 12:00:04 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-20 12:13:39 +0200
commit820a40327dfd075f03c8cbe336f955f45e3e60ef (patch)
tree2a226703b0fea13f2b8f1ae0b3d6d8b927344269
parentdbc31ab25c355eae373e1766b4a77fccbe462bf3 (diff)
downloadguix-820a40327dfd075f03c8cbe336f955f45e3e60ef.tar
guix-820a40327dfd075f03c8cbe336f955f45e3e60ef.tar.gz
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.
-rw-r--r--guix/ftp-client.scm5
1 files changed, 1 insertions, 4 deletions
diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm
index ab72405df0..37feb895a5 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" "guix@example.com" 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.