diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-06-12 10:11:34 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-06-15 17:15:53 -0400 |
commit | 40da3f406aa8e6e135da2805e7a5b5995e8274a5 (patch) | |
tree | 03f716d3899183de30d9137d6463364932038d34 /klippy | |
parent | 4905667ee2c65f132546e7aacc1fdd76ccaaa628 (diff) | |
download | kutter-40da3f406aa8e6e135da2805e7a5b5995e8274a5.tar.gz kutter-40da3f406aa8e6e135da2805e7a5b5995e8274a5.tar.xz kutter-40da3f406aa8e6e135da2805e7a5b5995e8274a5.zip |
queuelogger: Use "import Queue as queue" for improved Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r-- | klippy/queuelogger.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/queuelogger.py b/klippy/queuelogger.py index 52a05261..4567fb3f 100644 --- a/klippy/queuelogger.py +++ b/klippy/queuelogger.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 logging, logging.handlers, threading, Queue, time +import logging, logging.handlers, threading, Queue as queue, time # Class to forward all messages through a queue to a background thread class QueueHandler(logging.Handler): @@ -25,7 +25,7 @@ class QueueListener(logging.handlers.TimedRotatingFileHandler): def __init__(self, filename): logging.handlers.TimedRotatingFileHandler.__init__( self, filename, when='midnight', backupCount=5) - self.bg_queue = Queue.Queue() + self.bg_queue = queue.Queue() self.bg_thread = threading.Thread(target=self._bg_thread) self.bg_thread.start() self.rollover_info = {} |