From e2c621f1d9ab4b1a607d5f3b2812755a2cc5e87c Mon Sep 17 00:00:00 2001 From: squidfunk Date: Tue, 15 Oct 2024 22:52:36 +0200 Subject: [PATCH] Fixed regression in privacy plugin --- material/plugins/privacy/plugin.py | 4 ++++ src/plugins/privacy/plugin.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/material/plugins/privacy/plugin.py b/material/plugins/privacy/plugin.py index 7dd2cc550..88f530b80 100644 --- a/material/plugins/privacy/plugin.py +++ b/material/plugins/privacy/plugin.py @@ -149,6 +149,10 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]): # Sync all concurrent jobs def on_env(self, env, *, config, files): + if not self.config.enabled: + return + + # Wait until all jobs until now are finished wait(self.pool_jobs) # Process external assets in template (run later) diff --git a/src/plugins/privacy/plugin.py b/src/plugins/privacy/plugin.py index 7dd2cc550..88f530b80 100644 --- a/src/plugins/privacy/plugin.py +++ b/src/plugins/privacy/plugin.py @@ -149,6 +149,10 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]): # Sync all concurrent jobs def on_env(self, env, *, config, files): + if not self.config.enabled: + return + + # Wait until all jobs until now are finished wait(self.pool_jobs) # Process external assets in template (run later)