From d5666f7ffc496a9ead19cb25b2ea39226959eff2 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Fri, 30 Apr 2021 23:01:50 +0300 Subject: [PATCH] Revert hidden imports in queues (Fixes: #1758) --- src/queues.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/queues.py b/src/queues.py index 40ebcdad..0c03b251 100644 --- a/src/queues.py +++ b/src/queues.py @@ -1,19 +1,17 @@ """Most of the queues used by bitmessage threads are defined here.""" -import sys -if sys.version_info[0] == 3: - import queue as Queue -else: - import Queue - import threading import time +try: + import queue as Queue +except ImportError: + import Queue -import sys -if sys.version_info[0] == 3: - from .multiqueue import MultiQueue -else: +try: from multiqueue import MultiQueue +except ImportError: + from .multiqueue import MultiQueue + class ObjectProcessorQueue(Queue.Queue): """Special queue class using lock for `.threads.objectProcessor`"""