summaryrefslogtreecommitdiff
path: root/pelican/generators.py
diff options
context:
space:
mode:
Diffstat (limited to 'pelican/generators.py')
-rw-r--r--pelican/generators.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pelican/generators.py b/pelican/generators.py
index 232f4759..63e20a0a 100644
--- a/pelican/generators.py
+++ b/pelican/generators.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import calendar
import errno
import fnmatch
@@ -28,7 +26,7 @@ class PelicanTemplateNotFound(Exception):
pass
-class Generator(object):
+class Generator:
"""Baseclass generator"""
def __init__(self, context, settings, path, theme, output_path,
@@ -262,7 +260,7 @@ class _FileLoader(BaseLoader):
if template != self.path or not os.path.exists(self.fullpath):
raise TemplateNotFound(template)
mtime = os.path.getmtime(self.fullpath)
- with open(self.fullpath, 'r', encoding='utf-8') as f:
+ with open(self.fullpath, encoding='utf-8') as f:
source = f.read()
return (source, self.fullpath,
lambda: mtime == os.path.getmtime(self.fullpath))