[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/06: offload: Gracefully handle invalid results from 'machines.scm'.
From: |
Ludovic Courtès |
Subject: |
05/06: offload: Gracefully handle invalid results from 'machines.scm'. |
Date: |
Thu, 14 Jun 2018 17:36:19 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit a9a685cc0024a4e0dad5d7abd9ca6fb880ae4f8e
Author: Ludovic Courtès <address@hidden>
Date: Thu Jun 14 23:08:08 2018 +0200
offload: Gracefully handle invalid results from 'machines.scm'.
* guix/scripts/offload.scm (build-machines): Check the result of FILE.
Ignore it if it's not a list of <build-machine>.
---
guix/scripts/offload.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index fb61d7c..664497b 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -124,7 +124,15 @@ determined."
(save-module-excursion
(lambda ()
(set-current-module %user-module)
- (primitive-load file))))
+ (match (primitive-load file)
+ (((? build-machine? machines) ...)
+ machines)
+ (_
+ ;; Instead of crashing, assume the empty list.
+ (warning (G_ "'~a' did not return a list of build machines; \
+ignoring it~%")
+ file)
+ '())))))
(lambda args
(match args
(('system-error . rest)
- branch master updated (0effadc -> 411959b), Ludovic Courtès, 2018/06/14
- 01/06: self: Add 'guix-daemon' to the result., Ludovic Courtès, 2018/06/14
- 02/06: gnu: Add lightgbm., Ludovic Courtès, 2018/06/14
- 04/06: gnu: emacs-racket-mode: Update and bug fix., Ludovic Courtès, 2018/06/14
- 03/06: gnu: Add vowpal-wabbit., Ludovic Courtès, 2018/06/14
- 06/06: linux-initrd: Module check correctly handles hyphen vs. underscore., Ludovic Courtès, 2018/06/14
- 05/06: offload: Gracefully handle invalid results from 'machines.scm'.,
Ludovic Courtès <=