##// END OF EJS Templates
pycompat: fix demand import handling of Queue...
timeless -
r28833:672fc23b default
parent child Browse files
Show More
@@ -1,18 +1,19 b''
1 # pycompat.py - portability shim for python 3
1 # pycompat.py - portability shim for python 3
2 #
2 #
3 # This software may be used and distributed according to the terms of the
3 # This software may be used and distributed according to the terms of the
4 # GNU General Public License version 2 or any later version.
4 # GNU General Public License version 2 or any later version.
5
5
6 """Mercurial portability shim for python 3.
6 """Mercurial portability shim for python 3.
7
7
8 This contains aliases to hide python version-specific details from the core.
8 This contains aliases to hide python version-specific details from the core.
9 """
9 """
10
10
11 from __future__ import absolute_import
11 from __future__ import absolute_import
12
12
13 try:
13 try:
14 import Queue as _queue
14 import Queue as _queue
15 _queue.Queue
15 except ImportError:
16 except ImportError:
16 import queue as _queue
17 import queue as _queue
17 empty = _queue.Empty
18 empty = _queue.Empty
18 queue = _queue.Queue
19 queue = _queue.Queue
General Comments 0
You need to be logged in to leave comments. Login now