Mercurial > public > mercurial-scm > hg
diff mercurial/demandimport.py @ 32365:b2b5605285ec
demandimport: strictly check missing locals argument
locals may be an empty dict.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 20 May 2017 15:09:14 +0900 |
parents | c939fdce0fde |
children |
line wrap: on
line diff
--- a/mercurial/demandimport.py Thu May 18 18:01:48 2017 -0400 +++ b/mercurial/demandimport.py Sat May 20 15:09:14 2017 +0900 @@ -158,7 +158,7 @@ _pypy = '__pypy__' in sys.builtin_module_names def _demandimport(name, globals=None, locals=None, fromlist=None, level=level): - if not locals or name in ignore or fromlist == ('*',): + if locals is None or name in ignore or fromlist == ('*',): # these cases we can't really delay return _hgextimport(_import, name, globals, locals, fromlist, level) elif not fromlist: