##// END OF EJS Templates
demandimport: support keyword arguments on _hgextimport...
Gregory Szorc -
r25936:f90bb200 default
parent child Browse files
Show More
@@ -43,9 +43,9 b' if sys.version_info[0] >= 3:'
43 level = 0
43 level = 0
44 _import = _origimport
44 _import = _origimport
45
45
46 def _hgextimport(importfunc, name, globals, *args):
46 def _hgextimport(importfunc, name, globals, *args, **kwargs):
47 try:
47 try:
48 return importfunc(name, globals, *args)
48 return importfunc(name, globals, *args, **kwargs)
49 except ImportError:
49 except ImportError:
50 if not globals:
50 if not globals:
51 raise
51 raise
@@ -56,7 +56,7 b' def _hgextimport(importfunc, name, globa'
56 if nameroot != contextroot:
56 if nameroot != contextroot:
57 raise
57 raise
58 # retry to import with "hgext_" prefix
58 # retry to import with "hgext_" prefix
59 return importfunc(hgextname, globals, *args)
59 return importfunc(hgextname, globals, *args, **kwargs)
60
60
61 class _demandmod(object):
61 class _demandmod(object):
62 """module demand-loader and proxy"""
62 """module demand-loader and proxy"""
General Comments 0
You need to be logged in to leave comments. Login now