~ruther/guix-local

820a40327dfd075f03c8cbe336f955f45e3e60ef — Ludovic Courtès 11 years ago dbc31ab
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.
1 files changed, 1 insertions(+), 4 deletions(-)

M guix/ftp-client.scm
M guix/ftp-client.scm => guix/ftp-client.scm +1 -4
@@ 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.