summaryrefslogtreecommitdiff
path: root/drmaa
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-02-13 22:41:02 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-02-13 23:39:14 +0100
commitc5e0230141f465cbc0d70d9a07c8e33501845b6a (patch)
tree768ff81a03ee3004b4fa114fc39b8afc91cd8964 /drmaa
parentdff66878f79115b33faa256d2bf6c2deb76130c5 (diff)
high: Do not set empty values.
Diffstat (limited to 'drmaa')
-rw-r--r--drmaa/v1/high.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/drmaa/v1/high.scm b/drmaa/v1/high.scm
index 02aeb83..bef0680 100644
--- a/drmaa/v1/high.scm
+++ b/drmaa/v1/high.scm
@@ -310,9 +310,14 @@
(when (slot-bound? instance slot-name)
(let* ((value (slot-ref instance slot-name))
(transformed (transform value)))
- (if (pair? transformed)
- (apply low:set-vector-attribute! t drmaa transformed)
- (low:set-attribute! t drmaa transformed))))))
+ (cond
+ ;; Empty lists and #false are not valid values to set.
+ ((or (null? transformed) (not transformed))
+ #true)
+ ((pair? transformed)
+ (apply low:set-vector-attribute! t drmaa transformed))
+ (else
+ (low:set-attribute! t drmaa transformed)))))))
(class-slots klass))
t)