diff options
author | NoahY <yuttadhammo@yahoo.com> | 2011-07-28 11:12:04 +0530 |
---|---|---|
committer | NoahY <yuttadhammo@yahoo.com> | 2011-07-28 11:12:04 +0530 |
commit | 83db572a643d3f63dd17e8b529285a148788f2f1 (patch) | |
tree | 43b074fad36603c5dd120344a3402696d67d6a82 | |
parent | c7673f7d24277e07d2cbe2eb30a6196861d659ca (diff) | |
download | askbot-83db572a643d3f63dd17e8b529285a148788f2f1.tar.gz askbot-83db572a643d3f63dd17e8b529285a148788f2f1.tar.bz2 askbot-83db572a643d3f63dd17e8b529285a148788f2f1.zip |
removed duplicate log calulation
-rw-r--r-- | askbot/templatetags/extra_tags.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/askbot/templatetags/extra_tags.py b/askbot/templatetags/extra_tags.py index c9494a39..805d53d6 100644 --- a/askbot/templatetags/extra_tags.py +++ b/askbot/templatetags/extra_tags.py @@ -76,13 +76,12 @@ def tag_font_size(max_size, min_size, current_size): #avoid invalid calculation if current_size == 0: - current_size = 1- + current_size = 1 try: weight = (math.log10(current_size) - math.log10(min_size)) / (math.log10(max_size) - math.log10(min_size)) except Exception: weight = 0 - weight = (math.log10(current_size) - math.log10(min_size)) / (math.log10(max_size) - math.log10(min_size)) return int(MIN_FONTSIZE + round((MAX_FONTSIZE - MIN_FONTSIZE) * weight)) #todo: this function may need to be removed to simplify the paginator functionality |