From a0b6a176f2b288b090595efde32fce58565dff9d Mon Sep 17 00:00:00 2001 From: Nate Hardison Date: Wed, 22 May 2013 14:49:22 -0700 Subject: [PATCH] Use .get instead of [] to access env hash If the `THEME_NAME` environment token isn't defined, then the application.scss.mako file will crash during preprocessing. Use .get to avoid a crash. --- lms/static/sass/application.scss.mako | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/static/sass/application.scss.mako b/lms/static/sass/application.scss.mako index 434475c6ac..4ec91dbf57 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 not env.get('THEME_NAME') is None: // import theme's Sass overrides - @import '${env['THEME_NAME']}' + @import '${env.get('THEME_NAME')}' % endif