Commit 636ef0f5dd6b27a62c7c4e873dd13ee6de57566e

Thomas de Grivel 2015-09-18T04:39:06

Do not describe NIL property values.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/core/resource.lisp b/core/resource.lisp
index 9eec95d..e5027d6 100644
--- a/core/resource.lisp
+++ b/core/resource.lisp
@@ -108,9 +108,11 @@
                                   (collect k))
                             #'string<))
          (sorted-props (iter (for key in sorted-keys)
-                             (collect key)
-                             (collect (describe-probed-property-value
-                                       res key (get-property key props))))))
+                             (for value = (describe-probed-property-value
+                                           res key (get-property key props)))
+                             (when value
+                               (collect key)
+                               (collect value)))))
     `(resource ',(class-name (class-of res))
                ,(resource-id res)
                ,@sorted-props)))