From eef5156d95ba2591614c96e7b10be8f0c8fe2cb5 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Sun, 12 Apr 2020 17:12:04 +0200 Subject: [PATCH] obi stats: fixed error when printing bool keys --- python/obitools3/commands/stats.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/obitools3/commands/stats.pyx b/python/obitools3/commands/stats.pyx index 62431e1..97dbc53 100755 --- a/python/obitools3/commands/stats.pyx +++ b/python/obitools3/commands/stats.pyx @@ -251,7 +251,7 @@ def run(config): for i in range(len(sorted_stats)): c = sorted_stats[i][0] for v in c: - if v is not None: + if type(v) == bytes: print(pcat % tostr(v)+"\t", end="") else: print(pcat % str(v)+"\t", end="") @@ -268,6 +268,6 @@ def run(config): print("%7d" %catcount[c], end="") print("%9d" %totcount[c]) - input[0].close() + input[0].close(force=True) logger("info", "Done.")