From: Michael Tremer Date: Mon, 5 Sep 2016 11:19:35 +0000 (+0200) Subject: Replace Nones with UNKNOWN instead of NaN X-Git-Url: http://git.ipfire.org/?p=oddments%2Fcollecty.git;a=commitdiff_plain;h=9e84485f3a890645652a3331e939e3a7b405808f Replace Nones with UNKNOWN instead of NaN Signed-off-by: Michael Tremer --- diff --git a/src/collecty/plugins/base.py b/src/collecty/plugins/base.py index 5b13044..d937a95 100644 --- a/src/collecty/plugins/base.py +++ b/src/collecty/plugins/base.py @@ -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)