Skip to content

Commit

Permalink
Fixed bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bystroushaak committed Feb 12, 2019
1 parent 46c6f15 commit a358300
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blog_analysis.py
Expand Up @@ -54,6 +54,10 @@ def analyze(self, blog):
blog_yyyy = self.timestamp_to_yyyy(blog.created_ts)
blog_yyyy_mm = self.timestamp_to_yyyy_mm(blog.created_ts)

this_year_month = time.strftime('%Y-%m')
if blog_yyyy_mm == this_year_month:
return

self.length_of_blogs_in_years[blog_yyyy] += len(blog.text)
self.length_of_blogs_in_months[blog_yyyy_mm] += len(blog.text)

Expand Down

0 comments on commit a358300

Please sign in to comment.