Navigation Menu

Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #7 from douglatornell/fix-warnings
Browse files Browse the repository at this point in the history
Fix source of ResourceWarning exceptions.
  • Loading branch information
EnigmaCurry committed May 3, 2012
2 parents a2318b9 + a4725ab commit abae7e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blogofile_blog/site_src/_controllers/blog/post.py
Expand Up @@ -392,7 +392,8 @@ def parse_posts(directory):
#It refuses to open files without replacing newlines with CR+LF
#reverting to regular open and decode:
try:
src = open(post_path, "r").read()
with open(post_path, "r") as src_file:
src = src_file.read()
except:
logger.exception("Error reading post: {0}".format(post_path))
raise
Expand Down

0 comments on commit abae7e3

Please sign in to comment.