From f5614dd75d36fb446456fc2f36032bf9778ecf95 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 18 Apr 2025 11:00:35 +0100 Subject: [PATCH] Remove redundant branch from retry-on-missing-store-item I think #:unwind-for-type prevents this condition. --- .../jobs/load-new-guix-revision.scm | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 3daae30..4eb3c81 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -123,17 +123,14 @@ (define* (retry-on-missing-store-item thunk #:key on-exception) (with-exception-handler (lambda (exn) - (if (missing-store-item-error? exn) - (begin - (simple-format (current-error-port) - "missing store item ~A, retrying ~A\n" - (missing-store-item-error-item exn) - thunk) - (when on-exception (on-exception)) - (retry-on-missing-store-item - thunk - #:on-exception on-exception)) - (raise-exception exn))) + (simple-format (current-error-port) + "missing store item ~A, retrying ~A\n" + (missing-store-item-error-item exn) + thunk) + (when on-exception (on-exception)) + (retry-on-missing-store-item + thunk + #:on-exception on-exception)) thunk #:unwind? #t #:unwind-for-type &missing-store-item-error))