From: vsr Date: Wed, 13 May 2009 14:39:43 +0000 (+0000) Subject: Issue 0020349: compatibility python 2.6 in import_hook X-Git-Tag: V5_1_2rc1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c0b763a5ee56f4e2c66ae7b190499f0cfef70a66;p=modules%2Fkernel.git Issue 0020349: compatibility python 2.6 in import_hook --- diff --git a/src/KERNEL_PY/import_hook.py b/src/KERNEL_PY/import_hook.py index e1a48d354..56322e56e 100755 --- a/src/KERNEL_PY/import_hook.py +++ b/src/KERNEL_PY/import_hook.py @@ -149,14 +149,14 @@ def ensure_fromlist(m, fromlist, recursive=0): l.append((subname,submod)) return l -def import_hook(name, globals=None, locals=None, fromlist=None): +def import_hook(name, globals=None, locals=None, fromlist=None, *args): """ 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) + module= original_import(name, globals, locals, fromlist, *args) if fromlist: #when fromlist is specified, module is the real module