projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fad031
)
Skip templates with syntax errors on babel extract
author
Armin Ronacher
<armin.ronacher@active-4.com>
Sun, 29 Jun 2008 15:23:04 +0000
(17:23 +0200)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Sun, 29 Jun 2008 15:23:04 +0000
(17:23 +0200)
--HG--
branch : trunk
jinja2/ext.py
patch
|
blob
|
history
diff --git
a/jinja2/ext.py
b/jinja2/ext.py
index 4d68983a517f9d8dca6176fa9238416f7e6a8af1..0f30d5477f85f207e23628a30b97f53bd9e9e1a3 100644
(file)
--- a/
jinja2/ext.py
+++ b/
jinja2/ext.py
@@
-425,7
+425,11
@@
def babel_extract(fileobj, keywords, comment_tags, options):
)
source = fileobj.read().decode(options.get('encoding', 'utf-8'))
- node = environment.parse(source)
+ try:
+ node = environment.parse(source)
+ except TemplateSyntaxError, e:
+ # skip templates with syntax errors
+ return
for lineno, func, message in extract_from_ast(node, keywords):
yield lineno, func, message, []