From 01d065620b247c8bab1f598bf167034c97ea814b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 21 Jan 2020 22:41:03 +0100 Subject: [PATCH] pages: use open() to open file (#39163) --- wcs/qommon/pages.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wcs/qommon/pages.py b/wcs/qommon/pages.py index b13ccfea3..5b4764e65 100644 --- a/wcs/qommon/pages.py +++ b/wcs/qommon/pages.py @@ -37,7 +37,6 @@ class PagesDirectory(Directory): page_file = os.path.join(pages_dir, component) if not os.path.exists(page_file): raise errors.TraversalError() - content = file(page_file).read() + content = open(page_file).read() template.html_top() return content -