From f90d495ed8dd5044aa7928966030b0c62ced692a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 15 Jan 2021 21:40:21 +0100 Subject: [PATCH] Fix `paver update_assets` warning on missing sass dir (#25771) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On missing sass directory, the following kind of warning was printed: Sass dir '[{'sass_source_dir': path('lms/static/sass'), 'css_destination_dir': Path('/openedx/themes/indigo/lms/static/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms/static/sas│.. s/partials'), path('lms/static/sass/partials'), path('lms/static/sass')]}, {'sass_source_dir': Path('/openedx/themes/indigo/lms/static/sass'), 'css_destination_dir': Path('/openedx/themes│. /indigo/lms/static/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms/static/sass/partials'), path('lms/static/sass/partials'), path('lms/static/sass')]}, {'sass_source_dir': Path('│ /openedx/themes/indigo/lms/static/certificates/sass'), 'css_destination_dir': Path('/openedx/themes/indigo/lms/static/certificates/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms│ /static/sass/partials'), Path('/openedx/themes/indigo/lms/static/sass')]}]' does not exists, skipping sass compilation for '/openedx/themes/indigo' Which was rather inconvenient. Instead, we now print the following warning: Sass dir '/openedx/themes/indigo/lms/static/certificates/sass' does not exists, skipping sass compilation for '/openedx/themes/indigo' --- pavelib/assets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pavelib/assets.py b/pavelib/assets.py index 9d2e3f12f1..eee3e25bb5 100644 --- a/pavelib/assets.py +++ b/pavelib/assets.py @@ -537,7 +537,7 @@ def _compile_sass(system, theme, debug, force, timing_info): if not sass_source_dir.isdir(): print("\033[91m Sass dir '{dir}' does not exists, skipping sass compilation for '{theme}' \033[00m".format( - dir=sass_dirs, theme=theme or system, + dir=sass_source_dir, theme=theme or system, )) # theme doesn't override sass directory, so skip it continue