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