Commit b524f0e1 by Ari Rizzitano Committed by GitHub

Merge pull request #15610 from edx/ari/fix-webpack-failures

catch WebpackLoaderBadStatsError in test runs
parents f86f5998 038d5a13
...@@ -93,6 +93,7 @@ source, template_path = Loader(engine).load_template_source(path) ...@@ -93,6 +93,7 @@ source, template_path = Loader(engine).load_template_source(path)
</%doc> </%doc>
<% <%
from django.template import Template, Context from django.template import Template, Context
from webpack_loader.exceptions import WebpackLoaderBadStatsError
try: try:
return Template(""" return Template("""
{% load render_bundle from webpack_loader %} {% load render_bundle from webpack_loader %}
...@@ -105,9 +106,9 @@ source, template_path = Loader(engine).load_template_source(path) ...@@ -105,9 +106,9 @@ source, template_path = Loader(engine).load_template_source(path)
'entry': entry, 'entry': entry,
'body': capture(caller.body) 'body': capture(caller.body)
})) }))
except IOError as e: except (IOError, WebpackLoaderBadStatsError) as e:
# Don't break Mako template rendering if the bundle or webpack-stats can't be found, but log it # Don't break Mako template rendering if the bundle or webpack-stats can't be found, but log it
logger.error(e) logger.error('[LEARNER-1938] {error}'.format(error=e))
%> %>
</%def> </%def>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment