comparison 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
comparison
equal deleted inserted replaced
12685:a247751652ba 12686:fe31f834a9ff
43 self._data[3].append(name) 43 self._data[3].append(name)
44 def _load(self): 44 def _load(self):
45 if not self._module: 45 if not self._module:
46 head, globals, locals, after, level = self._data 46 head, globals, locals, after, level = self._data
47 if level is not None: 47 if level is not None:
48 mod = _origimport(head, globals, locals, level) 48 mod = _origimport(head, globals, locals, level=level)
49 else: 49 else:
50 mod = _origimport(head, globals, locals) 50 mod = _origimport(head, globals, locals)
51 # load submodules 51 # load submodules
52 def subload(mod, p): 52 def subload(mod, p):
53 h, t = p, None 53 h, t = p, None