From: caremoli Date: Mon, 5 Jul 2010 10:07:40 +0000 (+0000) Subject: CCAR: add keywords arguments to import_hook (python 2.6) X-Git-Tag: Plotenh~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=db11a749d1ec4c815f624d115c1a6c1df5376892;p=modules%2Fkernel.git CCAR: add keywords arguments to import_hook (python 2.6) --- diff --git a/src/KERNEL_PY/import_hook.py b/src/KERNEL_PY/import_hook.py index 54c5f1313..3d628ecab 100755 --- a/src/KERNEL_PY/import_hook.py +++ b/src/KERNEL_PY/import_hook.py @@ -151,14 +151,14 @@ def ensure_fromlist(m, fromlist, recursive=0): l.append((subname,submod)) return l -def import_hook(name, globals=None, locals=None, fromlist=None, *args): +def import_hook(name, globals=None, locals=None, fromlist=None, *args, **kwds): """ Import replacement for sharing modules among multiple interpreters Mostly update sys.modules before doing real import """ #print "import_hook",name,fromlist m=get_shared_imported(name,fromlist) - module= original_import(name, globals, locals, fromlist, *args) + module= original_import(name, globals, locals, fromlist, *args, **kwds) if fromlist: #when fromlist is specified, module is the real module