From b4a7a9ec41fe055b1bf0a54d46df178acf2443e4 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 27 Dec 2020 16:15:29 +0100 Subject: [PATCH] Fix function arguments --- resources/lib/backgroundthread.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lib/backgroundthread.py b/resources/lib/backgroundthread.py index d797df6b..32c45b39 100644 --- a/resources/lib/backgroundthread.py +++ b/resources/lib/backgroundthread.py @@ -253,15 +253,15 @@ class OrderedQueue(queue.PriorityQueue, object): self.next_index = 0 super(OrderedQueue, self).__init__(maxsize) - def _qsize(self, len=len): + def _qsize(self): try: return len(self.queue) if self.queue[0][0] == self.next_index else 0 except IndexError: return 0 - def _get(self, heappop=heapq.heappop): + def _get(self): self.next_index += 1 - return heappop(self.queue) + return heapq.heappop(self.queue) class Tasks(list): @@ -335,9 +335,9 @@ class FunctionAsTask(Task): class MutablePriorityQueue(queue.PriorityQueue): - def _get(self, heappop=heapq.heappop): + def _get(self): self.queue.sort() - return heappop(self.queue) + return heapq.heappop(self.queue) def lowest(self): """Return the lowest priority item in the queue (not reliable!)."""