aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXinbin Huang <bin.huangxb@gmail.com>2020-04-08 13:15:30 -0700
committerGitHub <noreply@github.com>2020-04-08 13:15:30 -0700
commit35aa1948c0e80ba864c949ec764edbe9debfc092 (patch)
tree66b293fc7e418c20f4124a13328175f15200233b /src
parent169b676a003d4a73846f05618c8d1fedd2a0e402 (diff)
downloadjinja-35aa1948c0e80ba864c949ec764edbe9debfc092.tar.gz
Update oudated CutomLoader code example (#1185)
py3 for CustomLoader example
Diffstat (limited to 'src')
-rw-r--r--src/jinja2/loaders.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jinja2/loaders.py b/src/jinja2/loaders.py
index 6e546c00..09f678d7 100644
--- a/src/jinja2/loaders.py
+++ b/src/jinja2/loaders.py
@@ -55,8 +55,8 @@ class BaseLoader:
if not exists(path):
raise TemplateNotFound(template)
mtime = getmtime(path)
- with file(path) as f:
- source = f.read().decode('utf-8')
+ with open(path) as f:
+ source = f.read()
return source, path, lambda: mtime == getmtime(path)
"""