aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/reactor.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-06-12 10:11:57 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-06-15 17:15:53 -0400
commit4905667ee2c65f132546e7aacc1fdd76ccaaa628 (patch)
treeb24d28090d3890157275f7bf66b8abc9cca451cf /klippy/reactor.py
parent0e9aa76066b3201f6038894f88cd0363289ed587 (diff)
downloadkutter-4905667ee2c65f132546e7aacc1fdd76ccaaa628.tar.gz
kutter-4905667ee2c65f132546e7aacc1fdd76ccaaa628.tar.xz
kutter-4905667ee2c65f132546e7aacc1fdd76ccaaa628.zip
reactor: Use "import Queue as queue" for improved Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/reactor.py')
-rw-r--r--klippy/reactor.py6
1 files 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 <kevin@koconnor.net>
#
# 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):