From fa9555deb9fcb30f001236470a1539dc03824220 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Sun, 22 Sep 2019 20:21:53 +0200 Subject: [PATCH] obi stats: fixed bug with None values --- python/obitools3/commands/stats.pyx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/obitools3/commands/stats.pyx b/python/obitools3/commands/stats.pyx index 6e1718a..62431e1 100755 --- a/python/obitools3/commands/stats.pyx +++ b/python/obitools3/commands/stats.pyx @@ -251,7 +251,10 @@ def run(config): for i in range(len(sorted_stats)): c = sorted_stats[i][0] for v in c: - print(pcat % tostr(v)+"\t", end="") + if v is not None: + print(pcat % tostr(v)+"\t", end="") + else: + print(pcat % str(v)+"\t", end="") for m in config['stats']['minimum']: print((("%%%dd" % lmini[m]) % mini[m][c])+"\t", end="") for m in config['stats']['maximum']: