Commit 2206505d authored by Jason Madden's avatar Jason Madden

Explicitly close one more file for Windows.

parent 1b79c488
......@@ -547,7 +547,8 @@ def preprocess_filename(filename, config):
definitions = {}
result = []
including_section = []
for line in open(filename):
with open(filename) as f:
for line in f:
linecount += 1
rstripped = line.rstrip()
stripped = rstripped.lstrip()
......@@ -897,7 +898,11 @@ def atomic_write(filename, data):
if os.path.exists(filename):
os.unlink(filename)
try:
os.rename(tmpname, filename)
except:
log("Failed to rename '%s' to '%s", tmpname, filename)
raise
dbg('Wrote %s bytes to %s', len(data), filename)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment