daily-edition

changeset 41:faf4b49c5e6e

fixed a major, glaring bug.
author Atul Varma <varmaa@toolness.com>
date Wed Jan 20 07:46:51 2010 -0800 (2 years ago)
parents 000d59466d43
children 1f7b2375e904
files publish_edition.py
line diff
1.1 --- a/publish_edition.py Mon Jan 04 09:12:05 2010 -0800 1.2 +++ b/publish_edition.py Wed Jan 20 07:46:51 2010 -0800 1.3 @@ -134,6 +134,10 @@ 1.4 total_word_count += word_count 1.5 total_articles += 1 1.6 filtered_articles[author].append(article) 1.7 + words_left -= word_count 1.8 + articles_left -= 1 1.9 + if not articles_left: 1.10 + break 1.11 elif word_count > max_issue_word_count: 1.12 logging.warn( 1.13 'article will never be included in an ' 1.14 @@ -141,10 +145,6 @@ 1.15 article['url'], 1.16 word_count 1.17 )) 1.18 - words_left -= word_count 1.19 - articles_left -= 1 1.20 - if not articles_left: 1.21 - break 1.22 1.23 logging.debug('found %d articles (out of a potential %d), totalling ' 1.24 '%d words, with contibutions by %s.' %