]> git.ipfire.org Git - oddments/collecty.git/commitdiff
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 5b130444324f5c530efdad3b97e3155888d35c4e..d937a95e87454bf40e026238ee8f511299c445c6 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)