# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 2010-09-14 21:00:39 # Node ID fe31f834a9ff935185626416d93fd80055bef1f4 # Parent a247751652bad4a2186beb4ae696bfce4c2cb447 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...) diff --git a/mercurial/demandimport.py b/mercurial/demandimport.py --- a/mercurial/demandimport.py +++ b/mercurial/demandimport.py @@ -45,7 +45,7 @@ class _demandmod(object): 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