From 40da3f406aa8e6e135da2805e7a5b5995e8274a5 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 12 Jun 2020 10:11:34 -0400 Subject: [PATCH] queuelogger: Use "import Queue as queue" for improved Python3 compatibility Signed-off-by: Kevin O'Connor --- klippy/queuelogger.py | 4 ++-- 1 file 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 # # 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 = {}