diff --git a/lms/static/sass/application.scss.mako b/lms/static/sass/application.scss.mako index 434475c6ac..c310347b6f 100644 --- a/lms/static/sass/application.scss.mako +++ b/lms/static/sass/application.scss.mako @@ -45,7 +45,7 @@ ## called themes//, with its base Sass file in ## themes//static/sass/_.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 diff --git a/rakefiles/assets.rake b/rakefiles/assets.rake index b7edaa1b02..c0757b712b 100644 --- a/rakefiles/assets.rake +++ b/rakefiles/assets.rake @@ -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