Fix resource warning found manually

This commit is contained in:
Éric Araujo 2011-04-17 14:27:07 +02:00
parent a0b3c32c7a
commit dcb22a3936

View file

@ -294,6 +294,7 @@ class sdist(Command):
join_lines=1, lstrip_ws=1, rstrip_ws=1,
collapse_join=1)
try:
while True:
line = template.readline()
if line is None: # end of file
@ -305,6 +306,8 @@ class sdist(Command):
self.warn("%s, line %d: %s" % (template.filename,
template.current_line,
msg))
finally:
template.close()
def prune_file_list(self):
"""Prune off branches that might slip into the file list as created