diff options
author | German M. Bravo <german.mb@deipi.com> | 2013-10-05 08:45:43 -0500 |
---|---|---|
committer | German M. Bravo <german.mb@deipi.com> | 2013-10-05 08:45:43 -0500 |
commit | e735b69604a6753351a0876ea2f71adbbdb9ac75 (patch) | |
tree | 65ccb3c1ee23d3d24a7af8fbd71d06d84d5a7d11 | |
parent | 71573a1e10f415b22fbe5ae589ae6a674f79eda2 (diff) | |
download | pyscss-e735b69604a6753351a0876ea2f71adbbdb9ac75.tar.gz |
IMAGES_ROOT / FONTS_ROOT could be an empty string
-rw-r--r-- | scss/functions/compass/helpers.py | 6 | ||||
-rw-r--r-- | scss/functions/compass/images.py | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/scss/functions/compass/helpers.py b/scss/functions/compass/helpers.py index 1de1fce..ba01f28 100644 --- a/scss/functions/compass/helpers.py +++ b/scss/functions/compass/helpers.py @@ -496,10 +496,14 @@ COMPASS_HELPERS_LIBRARY.add(Number.wrap_python_function(math.tan), 'tan', 1) # ------------------------------------------------------------------------------ # Fonts +def _fonts_root(): + return config.STATIC_ROOT if config.FONTS_ROOT is None else config.FONTS_ROOT + + def _font_url(path, only_path=False, cache_buster=True, inline=False): filepath = String.unquoted(path).value file = None - FONTS_ROOT = config.FONTS_ROOT or config.STATIC_ROOT + FONTS_ROOT = _fonts_root() if callable(FONTS_ROOT): try: _file, _storage = list(FONTS_ROOT(filepath))[0] diff --git a/scss/functions/compass/images.py b/scss/functions/compass/images.py index 44c337a..f76d0d3 100644 --- a/scss/functions/compass/images.py +++ b/scss/functions/compass/images.py @@ -37,7 +37,7 @@ register = COMPASS_IMAGES_LIBRARY.register # ------------------------------------------------------------------------------ def _images_root(): - return config.IMAGES_ROOT or config.STATIC_ROOT + return config.STATIC_ROOT if config.IMAGES_ROOT is None else config.IMAGES_ROOT def _image_url(path, only_path=False, cache_buster=True, dst_color=None, src_color=None, inline=False, mime_type=None, spacing=None, collapse_x=None, collapse_y=None): |