If there's no ~length, use 0 as the fallback, not [""]

Otherwise, format_time raises an exception.
This commit is contained in:
Michael Wiencek
2013-06-11 22:55:00 -05:00
parent b58caa4805
commit 2c375d788c

View File

@@ -84,7 +84,7 @@ class TagCounter(dict):
return (ungettext("(different across %d item)", "(different across %d items)", count) % count, True)
else:
if tag == "~length":
msg = format_time(self[tag])
msg = format_time(self.get(tag, 0))
else:
msg = MULTI_VALUED_JOINER.join(self[tag])