summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-06-24 13:57:54 +0200
committerLudovic Courtès <ludo@gnu.org>2021-06-24 23:40:48 +0200
commit468a5f8676c82e17de98d12077c671823177d944 (patch)
tree9f3a4b47a129f4586da76508d08a8f13cb7734da
parent6dafd60b33a552067aa234272dcbd664f0bc5b76 (diff)
downloadguix-468a5f8676c82e17de98d12077c671823177d944.tar.gz
lint: 'with-networking-fail-safe' handles 'gnutls-error' exceptions.
* guix/lint.scm (call-with-networking-fail-safe): Add clause for 'gnutls-error'.
-rw-r--r--guix/lint.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/lint.scm b/guix/lint.scm
index d65d5ce8f9..36a672c081 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -68,6 +68,7 @@
                            . guix:open-connection-for-uri)))
   #:use-module (web request)
   #:use-module (web response)
+  #:autoload   (gnutls) (error->string)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-6)                      ;Unicode string ports
   #:use-module (srfi srfi-9)
@@ -1162,6 +1163,11 @@ display a message including MESSAGE and return ERROR-VALUE."
                   message
                   (tls-certificate-error-string args))
          error-value)
+        (('gnutls-error error function _ ...)
+         (warning (G_ "~a: TLS error in '~a': ~a~%")
+                  message
+                  function (error->string error))
+         error-value)
         ((and ('system-error _ ...) args)
          (let ((errno (system-error-errno args)))
            (if (member errno (list ECONNRESET ECONNABORTED ECONNREFUSED))