Mercurial > daily-edition
changeset 41:faf4b49c5e6e
fixed a major, glaring bug.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Wed, 20 Jan 2010 07:46:51 -0800 |
parents | 000d59466d43 |
children | 1f7b2375e904 |
files | publish_edition.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/publish_edition.py Mon Jan 04 09:12:05 2010 -0800 +++ b/publish_edition.py Wed Jan 20 07:46:51 2010 -0800 @@ -134,6 +134,10 @@ total_word_count += word_count total_articles += 1 filtered_articles[author].append(article) + words_left -= word_count + articles_left -= 1 + if not articles_left: + break elif word_count > max_issue_word_count: logging.warn( 'article will never be included in an ' @@ -141,10 +145,6 @@ article['url'], word_count )) - words_left -= word_count - articles_left -= 1 - if not articles_left: - break logging.debug('found %d articles (out of a potential %d), totalling ' '%d words, with contibutions by %s.' %