From 2c375d788cbb2d600c61bac147f0a123aeb5dd30 Mon Sep 17 00:00:00 2001 From: Michael Wiencek Date: Tue, 11 Jun 2013 22:55:00 -0500 Subject: [PATCH] If there's no ~length, use 0 as the fallback, not [""] Otherwise, format_time raises an exception. --- picard/ui/metadatabox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picard/ui/metadatabox.py b/picard/ui/metadatabox.py index 93f66a6a3..578ba998a 100644 --- a/picard/ui/metadatabox.py +++ b/picard/ui/metadatabox.py @@ -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])