Windows Envars: Remove extra config check

Tiny bit of cleanup here - there's no need to re-check the config for
`SILENT` for each variable. We can just initialize it once as either an
empty list or the calculated list of silent vars depending on the config
value.
This commit is contained in:
David McDonald
2025-02-12 10:23:46 -06:00
parent 8dceeb2144
commit 4712cafa4b
@@ -200,15 +200,13 @@ class Envars(interfaces.plugins.PluginInterface):
return values
def _generator(self, data):
silent_vars = []
if self.config.get("SILENT", None):
silent_vars = self._get_silent_vars()
silent_vars = self._get_silent_vars() if self.config.get("SILENT") else []
for task in data:
for var, val in task.environment_variables():
if self.config.get("silent", None):
if var in silent_vars:
continue
if var in silent_vars:
continue
yield (
0,
(