From 93e62c633661930c8c2e32d68ad6b79941a8d7f2 Mon Sep 17 00:00:00 2001 From: Nicolas Duhamel Date: Mon, 18 Apr 2011 23:21:57 +0800 Subject: [PATCH] fix issue #91 --- pelican/generators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/generators.py b/pelican/generators.py index 5a1f71b7..cc33c9f0 100755 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -232,13 +232,13 @@ class ArticlesGenerator(Generator): if tags: max_count = max(tags) steps = self.settings.get('TAG_CLOUD_STEPS') - + # calculate word sizes self.tag_cloud = [ ( tag, int( - math.floor(steps - (steps - 1) * math.log(count) / math.log(max_count)) + math.floor(steps - (steps - 1) * math.log(count) / (math.log(max_count)or 1)) ) ) for tag, count in tag_cloud