From 50f45a687859742fcdd91ed233a885042950e69e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Tue, 2 Jan 2018 15:17:53 +0100 Subject: [PATCH] optional_plugins.html: Use `open` to get file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "file" is not available on python3, let's use "open" to get file instance. Signed-off-by: Lukáš Doktor --- optional_plugins/html/avocado_result_html/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optional_plugins/html/avocado_result_html/__init__.py b/optional_plugins/html/avocado_result_html/__init__.py index 185e02b8..93c29a36 100644 --- a/optional_plugins/html/avocado_result_html/__init__.py +++ b/optional_plugins/html/avocado_result_html/__init__.py @@ -222,7 +222,7 @@ class HTMLResult(Result): setsid = getattr(os, 'setsid', None) if not setsid: setsid = getattr(os, 'setpgrp', None) - inout = file(os.devnull, "r+") + inout = open(os.devnull, "r+") cmd = ['xdg-open', html_path] subprocess.Popen(cmd, close_fds=True, stdin=inout, stdout=inout, stderr=inout, -- GitLab