]> git.notmuchmail.org Git - notmuch/blobdiff - doc/prerst2man.py
build: eliminate use of python execfile command
[notmuch] / doc / prerst2man.py
index 108f4a3949c0ba91791b6961cba904c4c7966069..968722a1c750c620e24e1d5869269930bd3e5b96 100644 (file)
@@ -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):
@@ -59,5 +60,5 @@ for page in man_pages:
     outfile.write("".join(lines))
     outfile.close()
 
-    os.system('set -x; rst2man {0} {1}/{2}.{3}'
-              .format(filename, outdir, page[0],page[4]))
+    system('set -x; rst2man {0} {1}/{2}.{3}'
+           .format(filename, outdir, page[0], page[4]))