Skip to content

Commit d85947a

Browse files
committed
doc/make.py: Use cwd in check_output instead of os.chdir
1 parent 5273715 commit d85947a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

doc/make.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,9 @@ def latex():
143143
raise SystemExit("Building LaTeX failed.")
144144

145145
# Produce pdf.
146-
os.chdir('build/latex')
147-
148146
# Call the makefile produced by sphinx...
149-
if subprocess.call("make"):
147+
if subprocess.call("make", cwd="build/latex"):
150148
raise SystemExit("Rendering LaTeX failed with.")
151-
152-
os.chdir('../..')
153149
else:
154150
print('latex build has not been tested on windows')
155151

@@ -166,13 +162,9 @@ def texinfo():
166162
raise SystemExit("Building Texinfo failed.")
167163

168164
# Produce info file.
169-
os.chdir('build/texinfo')
170-
171165
# Call the makefile produced by sphinx...
172-
if subprocess.call("make"):
166+
if subprocess.call("make", cwd="build/texinfo"):
173167
raise SystemExit("Rendering Texinfo failed with.")
174-
175-
os.chdir('../..')
176168
else:
177169
print('texinfo build has not been tested on windows')
178170

0 commit comments

Comments
 (0)