moved mdfile.close()
This commit is contained in:
parent
e3a47d7425
commit
93340fb3f4
@ -78,6 +78,8 @@ def main():
|
||||
word_count_by_status[current_status] += line_word_count
|
||||
status_by_chapter[chapter_heading][current_status] += line_word_count
|
||||
|
||||
mdfile.close()
|
||||
|
||||
# Do some final accounting after the last chapter.
|
||||
word_count_by_act[act_heading] += word_count_by_chapter[chapter_heading]
|
||||
total_word_count += word_count_by_chapter[chapter_heading]
|
||||
@ -114,8 +116,6 @@ def main():
|
||||
print(f'{status}: {status_word_count:,} words (~{status_word_count * 100 // total_word_count}%)')
|
||||
|
||||
print(f'total: {total_word_count:,} words')
|
||||
|
||||
mdfile.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user