Skip to content

Commit e94d3a6

Browse files
committed
change file() to open()
1 parent 2e91846 commit e94d3a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

problemtools/verifyproblem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ def __init__(self, problem, datadir, parent=None):
300300
configfile = os.path.join(self._datadir, 'testdata.yaml')
301301
if os.path.isfile(configfile):
302302
try:
303-
self.config = yaml.safe_load(file(configfile))
303+
with open(configfile) as f:
304+
self.config = yaml.safe_load(f)
304305
except Exception as e:
305306
self.error(e)
306307
self.config = {}

0 commit comments

Comments
 (0)