Commit fa91d062 authored by Stefan Behnel's avatar Stefan Behnel

fix test runner warning in Python 3.2 debug builds

parent 3d280f63
......@@ -763,10 +763,14 @@ class FileListExcluder:
def __init__(self, list_file):
self.excludes = {}
for line in open(list_file).readlines():
line = line.strip()
if line and line[0] != '#':
self.excludes[line.split()[0]] = True
f = open(list_file)
try:
for line in f.readlines():
line = line.strip()
if line and line[0] != '#':
self.excludes[line.split()[0]] = True
finally:
f.close()
def __call__(self, testname):
return testname in self.excludes or testname.split('.')[-1] in self.excludes
......
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