summaryrefslogtreecommitdiff
path: root/chromium/third_party/jinja2/meta.py
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-12-11 21:33:03 +0100
committerAndras Becsi <andras.becsi@digia.com>2013-12-13 12:34:07 +0100
commitf2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch)
tree0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/third_party/jinja2/meta.py
parent5362912cdb5eea702b68ebe23702468d17c3017a (diff)
downloadqtwebengine-chromium-f2a33ff9cbc6d19943f1c7fbddd1f23d23975577.tar.gz
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/third_party/jinja2/meta.py')
-rw-r--r--chromium/third_party/jinja2/meta.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/chromium/third_party/jinja2/meta.py b/chromium/third_party/jinja2/meta.py
index 3a779a5e9a8..3110cff6066 100644
--- a/chromium/third_party/jinja2/meta.py
+++ b/chromium/third_party/jinja2/meta.py
@@ -11,6 +11,7 @@
"""
from jinja2 import nodes
from jinja2.compiler import CodeGenerator
+from jinja2._compat import string_types
class TrackingCodeGenerator(CodeGenerator):
@@ -77,7 +78,7 @@ def find_referenced_templates(ast):
# something const, only yield the strings and ignore
# non-string consts that really just make no sense
if isinstance(template_name, nodes.Const):
- if isinstance(template_name.value, basestring):
+ if isinstance(template_name.value, string_types):
yield template_name.value
# something dynamic in there
else:
@@ -87,7 +88,7 @@ def find_referenced_templates(ast):
yield None
continue
# constant is a basestring, direct template name
- if isinstance(node.template.value, basestring):
+ if isinstance(node.template.value, string_types):
yield node.template.value
# a tuple or list (latter *should* not happen) made of consts,
# yield the consts that are strings. We could warn here for
@@ -95,7 +96,7 @@ def find_referenced_templates(ast):
elif isinstance(node, nodes.Include) and \
isinstance(node.template.value, (tuple, list)):
for template_name in node.template.value:
- if isinstance(template_name, basestring):
+ if isinstance(template_name, string_types):
yield template_name
# something else we don't care about, we could warn here
else: