www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8047476af3274e4285e7687c48339fae1c9d6fd7
parent e2fde3acbff09774d593a8df473976e8b3a05624
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Sun, 18 Jan 2015 06:53:39 -0700

manage snapshots: don't fail due to mangled previous build

Diffstat:
Mdistro-build-server/manage-snapshots.rkt | 24++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/distro-build-server/manage-snapshots.rkt b/distro-build-server/manage-snapshots.rkt @@ -62,16 +62,20 @@ (define past-successes (let ([current-table (get-installers-table table-file)]) (for/fold ([table (hash)]) ([s (in-list (reverse (remove current-snapshot (get-snapshots))))]) - (define past-table (get-installers-table - (build-path snapshots-dir s installers-dir "table.rktd"))) - (for/fold ([table table]) ([(k v) (in-hash past-table)]) - (if (or (hash-ref current-table k #f) - (hash-ref table k #f) - (not (file-exists? (build-path site-dir "log" k)))) - table - (hash-set table k (past-success s - (string-append s "/index.html") - v))))))) + (with-handlers ([exn:fail? (lambda (exn) + (log-error "failure getting installer table: ~a" + (exn-message exn)) + table)]) + (define past-table (get-installers-table + (build-path snapshots-dir s installers-dir "table.rktd"))) + (for/fold ([table table]) ([(k v) (in-hash past-table)]) + (if (or (hash-ref current-table k #f) + (hash-ref table k #f) + (not (file-exists? (build-path site-dir "log" k)))) + table + (hash-set table k (past-success s + (string-append s "/index.html") + v)))))))) (define current-rx (regexp (regexp-quote (version))))