Skip to content
Snippets Groups Projects
Commit 820a4032 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent dbc31ab2
No related branches found
No related tags found
No related merge requests found
...@@ -109,11 +109,8 @@ (define addresses ...@@ -109,11 +109,8 @@ (define addresses
(%ftp-login "anonymous" "guix@example.com" s) (%ftp-login "anonymous" "guix@example.com" s)
(%make-ftp-connection s ai)) (%make-ftp-connection s ai))
(begin (begin
(format (current-error-port)
"FTP to `~a' failed: ~A: ~A~%"
host code message)
(close s) (close s)
#f)))) (throw 'ftp-error s "log-in" code message)))))
(lambda args (lambda args
;; Connection failed, so try one of the other addresses. ;; Connection failed, so try one of the other addresses.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment