From 4905667ee2c65f132546e7aacc1fdd76ccaaa628 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 12 Jun 2020 10:11:57 -0400 Subject: [PATCH] reactor: Use "import Queue as queue" for improved Python3 compatibility Signed-off-by: Kevin O'Connor --- klippy/reactor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/klippy/reactor.py b/klippy/reactor.py index 3cd7aa01..07c7db19 100644 --- a/klippy/reactor.py +++ b/klippy/reactor.py @@ -3,7 +3,7 @@ # Copyright (C) 2016-2019 Kevin O'Connor # # This file may be distributed under the terms of the GNU GPLv3 license. -import os, select, math, time, Queue +import os, select, math, time, Queue as queue import greenlet import chelper, util @@ -102,7 +102,7 @@ class SelectReactor: self._next_timer = self.NEVER # Callbacks self._pipe_fds = None - self._async_queue = Queue.Queue() + self._async_queue = queue.Queue() # File descriptors self._fds = [] # Greenlets @@ -170,7 +170,7 @@ class SelectReactor: while 1: try: func, args = self._async_queue.get_nowait() - except Queue.Empty: + except queue.Empty: break func(*args) def _setup_async_callbacks(self):