From 9e72c8d16a138ffe81606678c20c212badef08e1 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Fri, 20 Sep 2019 20:46:33 +0200 Subject: [PATCH] obi ls: improved taxonomy list --- python/obitools3/commands/ls.pyx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/obitools3/commands/ls.pyx b/python/obitools3/commands/ls.pyx index d148c6f..bad04a5 100755 --- a/python/obitools3/commands/ls.pyx +++ b/python/obitools3/commands/ls.pyx @@ -42,9 +42,12 @@ def run(config): else: print(repr(input[1])) if input[2] == DMS: - print("\n### Taxonomies:") + taxolist = ["\n### Taxonomies:"] for t in Taxonomy.list_taxos(input[0]): - print("\t", tostr(t)) + taxolist.append("\t"+tostr(t)) + if len(taxolist) > 1: + for t in taxolist: + print(t) if config['ls']['longformat'] and len(input[1].comments) > 0: print("\n### Comments:") print(str(input[1].comments))