diff mercurial/demandimport.py @ 12686:fe31f834a9ff

demandimport: fix an obscure corner-case. Python's __import__() function has 'level' as the fourth argument, not the third. The code path in question probably never worked. (This was seen trying to run Mercurial in PyPy. Fixing this made it die somewhere else...)
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 14 Sep 2010 23:00:39 +0200
parents 50a4e55aa278
children cddea24aafed
line wrap: on
line diff
--- a/mercurial/demandimport.py	Sun Oct 10 00:38:57 2010 +0100
+++ b/mercurial/demandimport.py	Tue Sep 14 23:00:39 2010 +0200
@@ -45,7 +45,7 @@
         if not self._module:
             head, globals, locals, after, level = self._data
             if level is not None:
-                mod = _origimport(head, globals, locals, level)
+                mod = _origimport(head, globals, locals, level=level)
             else:
                 mod = _origimport(head, globals, locals)
             # load submodules