Skip to content

Commit 5573c89

Browse files
committed
QPID-8631: fill_in python 3 incompatibilities in qmf/console.py
1 parent 1077fe6 commit 5573c89

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

management/python/lib/qmf/console.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
""" Console API for Qpid Management Framework """
2121

22+
from __future__ import absolute_import
2223
from __future__ import print_function
2324

2425
import os
@@ -38,9 +39,22 @@
3839
from qpid.util import connect, ssl, URL
3940
from qpid.codec010 import StringCodec as Codec
4041
from threading import Lock, Condition, Thread, Semaphore
41-
from Queue import Queue, Empty
42+
try:
43+
from Queue import Queue, Empty
44+
except ImportError:
45+
from queue import Queue, Empty
4246
from time import time, strftime, gmtime, sleep
43-
from cStringIO import StringIO
47+
from io import StringIO
48+
49+
try:
50+
long
51+
except NameError:
52+
long = int
53+
54+
try:
55+
unicode
56+
except NameError:
57+
unicode = str
4458

4559
#import qpid.log
4660
#qpid.log.enable(name="qpid.io.cmd", level=qpid.log.DEBUG)

0 commit comments

Comments
 (0)