diff --git a/devel/release-checks.sh b/devel/release-checks.sh index 797d62ac..ae02f557 100755 --- a/devel/release-checks.sh +++ b/devel/release-checks.sh @@ -130,7 +130,7 @@ else fi echo -n "Checking that python bindings version is $VERSION... " -py_version=`python -c "execfile('$PV_FILE'); print __VERSION__"` +py_version=`python -c "with open('$PV_FILE') as vf: exec(vf.read()); print __VERSION__"` if [ "$py_version" = "$VERSION" ] then echo Yes. diff --git a/doc/prerst2man.py b/doc/prerst2man.py index 437dea99..968722a1 100644 --- a/doc/prerst2man.py +++ b/doc/prerst2man.py @@ -10,7 +10,8 @@ outdir = argv[2] if not isdir(outdir): makedirs(outdir, 0o755) -execfile(sourcedir + "/conf.py") +with open(sourcedir + "/conf.py") as cf: + exec(cf.read()) def header(file, startdocname, command, description, authors, section):