From 2d3c189016cde40b7fb4260fe4cfaf2d45a82d75 Mon Sep 17 00:00:00 2001 From: Johanna England Date: Tue, 5 Mar 2024 14:36:30 +0100 Subject: [PATCH] Fix deprecation warning by using is_set --- python/nav/ipdevpoll/jobs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/nav/ipdevpoll/jobs.py b/python/nav/ipdevpoll/jobs.py index 0f80f8cdaf..4de0afb035 100644 --- a/python/nav/ipdevpoll/jobs.py +++ b/python/nav/ipdevpoll/jobs.py @@ -319,7 +319,7 @@ def log_abort(failure): return failure def save(result): - if self.cancelled.isSet(): + if self.cancelled.is_set(): return wrap_up_job(result) df = self._save_container() @@ -524,7 +524,7 @@ def _container_factory(self, container_class, key, *args, **kwargs): def _raise_if_cancelled(self): """Raises an AbortedJobError if the current job is cancelled""" - if self.cancelled.isSet(): + if self.cancelled.is_set(): raise AbortedJobError("Job was already cancelled") @classmethod