##// END OF EJS Templates
Replace usage of os.devnull with subprocess.DEVNULL
Yann Pellegrini -
Show More
@@ -160,12 +160,11 b" def latex_to_png_dvipng(s, wrap, color='Black', scale=1.0):"
160 160 with workdir.joinpath(tmpfile).open("w", encoding="utf8") as f:
161 161 f.writelines(genelatex(s, wrap))
162 162
163 with open(os.devnull, 'wb') as devnull:
164 163 subprocess.check_call(
165 164 ["latex", "-halt-on-error", "-interaction", "batchmode", tmpfile],
166 165 cwd=workdir,
167 stdout=devnull,
168 stderr=devnull,
166 stdout=subprocess.DEVNULL,
167 stderr=subprocess.DEVNULL,
169 168 startupinfo=startupinfo,
170 169 )
171 170
@@ -188,8 +187,8 b" def latex_to_png_dvipng(s, wrap, color='Black', scale=1.0):"
188 187 color,
189 188 ],
190 189 cwd=workdir,
191 stdout=devnull,
192 stderr=devnull,
190 stdout=subprocess.DEVNULL,
191 stderr=subprocess.DEVNULL,
193 192 startupinfo=startupinfo,
194 193 )
195 194
General Comments 0
You need to be logged in to leave comments. Login now