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.
This commit is contained in:
Nate Hardison
2013-05-22 14:49:22 -07:00
parent ce2cbb74a1
commit a0b6a176f2

View File

@@ -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 not env.get('THEME_NAME') is None:
// import theme's Sass overrides
@import '${env['THEME_NAME']}'
@import '${env.get('THEME_NAME')}'
% endif