Skip to content

Commit

Permalink
Fix deprecation warning by using is_set
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Mar 7, 2024
1 parent 9cfd877 commit 2d3c189
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/nav/ipdevpoll/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2d3c189

Please sign in to comment.