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.master
parent
dbc31ab25c
commit
820a40327d
|
@ -109,11 +109,8 @@ or a TCP port number), and return it."
|
||||||
(%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.
|
||||||
|
|
Reference in New Issue