Commit af8b509e by Jay Zoldak

Merge pull request #2106 from edx/fix/nate/application-mako-crash

Use .get instead of [] to access env hash
parents ce2cbb74 daa0ac2f
......@@ -45,7 +45,7 @@
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if not env['THEME_NAME'] is None:
% if env.get('THEME_NAME') is not None:
// import theme's Sass overrides
@import '${env['THEME_NAME']}'
@import '${env.get('THEME_NAME')}'
% endif
......@@ -19,9 +19,11 @@ def preprocess_with_mako(filename)
# strip off the .mako extension
output_filename = filename.chomp(File.extname(filename))
# just pipe from stdout into the new file
# just pipe from stdout into the new file, exiting on failure
File.open(output_filename, 'w') do |file|
file.write(`python -c '#{mako}'`)
exit_code = $?.to_i
abort "#{mako} failed with #{exit_code}" if exit_code.to_i != 0
end
end
......
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