Replace Nones with UNKNOWN instead of NaN
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Sep 2016 11:19:35 +0000 (13:19 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Sep 2016 11:19:35 +0000 (13:19 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/plugins/base.py

index 5b13044..d937a95 100644 (file)
@@ -214,17 +214,14 @@ class Plugin(object, metaclass=PluginRegistration):
                if not isinstance(result, tuple) and not isinstance(result, list):
                        return result
 
-               # Replace all Nones by NaN
+               # Replace all Nones by UNKNOWN
                s = []
 
                for e in result:
                        if e is None:
-                               e = "NaN"
+                               e = "U"
 
-                       # Format as string
-                       e = "%s" % e
-
-                       s.append(e)
+                       s.append("%s" % e)
 
                return ":".join(s)