From 05198b65b777b7d58c5fcfb8017964c900d865ca Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Mon, 4 Mar 2013 14:54:29 -0800 Subject: [PATCH] Cleaner syntax and messages --- jrnl/jrnl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 051e6f14..323691fb 100755 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -105,9 +105,9 @@ def print_tags(journal): ] # To be read: [for entry in journal.entries: for tag in set(entry.tags): tag] tag_counts = {(tags.count(tag), tag) for tag in tags} - if len([t for t in tag_counts if t[0] == 1]): + if min(tag_counts)[0] == 0: tag_counts = filter(lambda x: x[0] > 1, tag_counts) - print('removed tags that appear only once..') + print('[Removed tags that appear only once.]') for n, tag in sorted(tag_counts, reverse=False): print("{:20} : {}".format(tag, n))