From b2cf0aaa38bcadfff084f49ca037bd4030f80914 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 10 Apr 2020 15:49:28 -0700 Subject: [PATCH] inline_email_css: Configure cssutils on import. This is necessary for when we later want to call inline_template from elsewhere. --- scripts/setup/inline_email_css.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup/inline_email_css.py b/scripts/setup/inline_email_css.py index eb65d2108e..948b6948dc 100755 --- a/scripts/setup/inline_email_css.py +++ b/scripts/setup/inline_email_css.py @@ -26,6 +26,7 @@ def configure_cssutils() -> None: profile.addProfiles([(Profiles.CSS_LEVEL_2, properties[Profiles.CSS_LEVEL_2], macros[Profiles.CSS_LEVEL_2])]) +configure_cssutils() def inline_template(template_name: str) -> None: os.makedirs(COMPILED_EMAIL_TEMPLATES_PATH, exist_ok=True) @@ -88,7 +89,6 @@ def get_all_templates_from_directory(directory: str) -> Set[str]: if __name__ == "__main__": templates_to_inline = get_all_templates_from_directory(EMAIL_TEMPLATES_PATH) - configure_cssutils() for template_name in templates_to_inline: inline_template(template_name)