diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-02-13 22:41:02 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-02-13 23:39:14 +0100 |
commit | c5e0230141f465cbc0d70d9a07c8e33501845b6a (patch) | |
tree | 768ff81a03ee3004b4fa114fc39b8afc91cd8964 /drmaa | |
parent | dff66878f79115b33faa256d2bf6c2deb76130c5 (diff) |
high: Do not set empty values.
Diffstat (limited to 'drmaa')
-rw-r--r-- | drmaa/v1/high.scm | 11 |
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) |