Skip to content

Commit bc29cad

Browse files
committed
Replace execfile with runpy (2.7 & 3.2+)
1 parent 29d1502 commit bc29cad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/refresh_readme.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from __future__ import print_function
77

88
import os
9+
import runpy
910

1011
readme_lines = []
1112
with open('README.rst', 'rt') as fobj:
@@ -16,8 +17,7 @@
1617
else:
1718
raise ValueError('Expected comment not found')
1819

19-
rel = {}
20-
execfile(os.path.join('nibabel', 'info.py'), rel)
20+
rel = runpy.run_path(os.path.join('nibabel', 'info.py'))
2121

2222
readme = ''.join(readme_lines) + '\n' + rel['LONG_DESCRIPTION']
2323

0 commit comments

Comments
 (0)