changeset 28833:672fc23bf9cc

pycompat: fix demand import handling of Queue When demandimport is enabled, simply importing a non existent module does not trigger ImportError, a property access is necessary.
author timeless <timeless@mozdev.org>
date Fri, 08 Apr 2016 14:03:05 +0000
parents f5ff10f6fa6b
children 2fac032c1269
files mercurial/pycompat.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pycompat.py	Tue Mar 29 17:43:23 2016 +0000
+++ b/mercurial/pycompat.py	Fri Apr 08 14:03:05 2016 +0000
@@ -12,6 +12,7 @@
 
 try:
     import Queue as _queue
+    _queue.Queue
 except ImportError:
     import queue as _queue
 empty = _queue.Empty