提交 79f7aa2d 编写于 作者: L Lukáš Doktor

Revert "HTML plugin: use subprocess.DEVNULL instead of custom open file"

The subprocess.DEVNULL is not available on Python2.

This reverts commit e51acbfa.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 4b6ba388
......@@ -222,9 +222,10 @@ class HTMLResult(Result):
setsid = getattr(os, 'setsid', None)
if not setsid:
setsid = getattr(os, 'setpgrp', None)
inout = file(os.devnull, "r+")
cmd = ['xdg-open', html_path]
subprocess.Popen(cmd, close_fds=True, stdin=subprocess.DEVNULL,
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
subprocess.Popen(cmd, close_fds=True, stdin=inout,
stdout=inout, stderr=inout,
preexec_fn=setsid)
def _render(self, result, output_path):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册