From 1f7c067c90480fe1aa39763211301a2df44bb028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 13 Oct 2022 15:59:06 +0200 Subject: [PATCH] Job conditions take a list (#3949) --- supervisor/host/network.py | 2 +- tests/jobs/test_job_decorator.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/supervisor/host/network.py b/supervisor/host/network.py index 80cd199a1..f2ca39dcb 100644 --- a/supervisor/host/network.py +++ b/supervisor/host/network.py @@ -114,7 +114,7 @@ class NetworkManager(CoreSysAttributes): self.sys_dbus.network.interfaces[inet_name] ) - @Job(conditions=JobCondition.HOST_NETWORK) + @Job(conditions=[JobCondition.HOST_NETWORK]) async def load(self): """Load network information and reapply defaults over dbus.""" # Apply current settings on each interface so OS can update any out of date defaults diff --git a/tests/jobs/test_job_decorator.py b/tests/jobs/test_job_decorator.py index cde306439..1954b7fde 100644 --- a/tests/jobs/test_job_decorator.py +++ b/tests/jobs/test_job_decorator.py @@ -422,7 +422,7 @@ async def test_supervisor_updated(coresys: CoreSys): """Initialize the test class.""" self.coresys = coresys - @Job(conditions=JobCondition.SUPERVISOR_UPDATED) + @Job(conditions=[JobCondition.SUPERVISOR_UPDATED]) async def execute(self) -> bool: """Execute the class method.""" return True @@ -447,7 +447,7 @@ async def test_plugins_updated(coresys: CoreSys): """Initialize the test class.""" self.coresys = coresys - @Job(conditions=JobCondition.PLUGINS_UPDATED) + @Job(conditions=[JobCondition.PLUGINS_UPDATED]) async def execute(self) -> bool: """Execute the class method.""" return True @@ -477,7 +477,7 @@ async def test_auto_update(coresys: CoreSys): """Initialize the test class.""" self.coresys = coresys - @Job(conditions=JobCondition.AUTO_UPDATE) + @Job(conditions=[JobCondition.AUTO_UPDATE]) async def execute(self) -> bool: """Execute the class method.""" return True