Commit dcb22a39 authored by Éric Araujo's avatar Éric Araujo

Fix resource warning found manually

parent a0b3c32c
...@@ -294,17 +294,20 @@ class sdist(Command): ...@@ -294,17 +294,20 @@ class sdist(Command):
join_lines=1, lstrip_ws=1, rstrip_ws=1, join_lines=1, lstrip_ws=1, rstrip_ws=1,
collapse_join=1) collapse_join=1)
while True: try:
line = template.readline() while True:
if line is None: # end of file line = template.readline()
break if line is None: # end of file
break
try:
self.filelist.process_template_line(line) try:
except DistutilsTemplateError as msg: self.filelist.process_template_line(line)
self.warn("%s, line %d: %s" % (template.filename, except DistutilsTemplateError as msg:
template.current_line, self.warn("%s, line %d: %s" % (template.filename,
msg)) template.current_line,
msg))
finally:
template.close()
def prune_file_list(self): def prune_file_list(self):
"""Prune off branches that might slip into the file list as created """Prune off branches that might slip into the file list as created
......
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