updated Queue and ConfigParser to use 2/3 compatible imports

This commit is contained in:
bharnden 2019-05-05 21:49:42 -07:00
parent b58d32c156
commit 864c7b69a1
6 changed files with 9 additions and 7 deletions

View file

@ -3,8 +3,8 @@ import logging
import os
import tempfile
import time
from Queue import Queue, Empty
from builtins import int
from queue import Queue, Empty
import grpc
from concurrent import futures

View file

@ -2,9 +2,9 @@
socket server request handlers leveraged by core servers.
"""
import Queue
import logging
import os
import queue
import shlex
import shutil
import socketserver
@ -69,7 +69,7 @@ class CoreHandler(socketserver.BaseRequestHandler):
MessageTypes.EVENT.value: self.handle_event_message,
MessageTypes.SESSION.value: self.handle_session_message,
}
self.message_queue = Queue.Queue()
self.message_queue = queue.Queue()
self.node_status_request = {}
self._shutdown_lock = threading.Lock()
self._sessions_lock = threading.Lock()
@ -466,7 +466,7 @@ class CoreHandler(socketserver.BaseRequestHandler):
try:
message = self.message_queue.get(timeout=1)
self.handle_message(message)
except Queue.Empty:
except queue.Empty:
pass
def handle_message(self, message):

View file

@ -1,4 +1,5 @@
enum34==1.1.6
configparser=3.5.0
future==0.17.1
futures==3.2.0
grpcio==1.18.0

View file

@ -6,7 +6,7 @@ message handlers are defined and some support for sending messages.
"""
import argparse
import ConfigParser
import configparser
import logging
import sys
import threading
@ -100,7 +100,7 @@ def get_merged_config(filename):
if args.configfile is not None:
filename = args.configfile
del args.configfile
cfg = ConfigParser.SafeConfigParser(defaults)
cfg = configparser.ConfigParser(defaults)
cfg.read(filename)
section = "core-daemon"

View file

@ -43,6 +43,7 @@ setup(
packages=find_packages(),
install_requires=[
"enum34",
"configparser",
"future",
"lxml"
],

View file

@ -1,6 +1,6 @@
import time
from Queue import Queue
from builtins import int
from queue import Queue
import grpc
import pytest