pages: use open() to open file (#39163)

This commit is contained in:
Frédéric Péters 2020-01-21 22:41:03 +01:00
parent 8f6f8f745f
commit 01d065620b
1 changed files with 1 additions and 2 deletions

View File

@ -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