]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CCAR: add keywords arguments to import_hook (python 2.6)
authorcaremoli <caremoli>
Mon, 5 Jul 2010 10:07:40 +0000 (10:07 +0000)
committercaremoli <caremoli>
Mon, 5 Jul 2010 10:07:40 +0000 (10:07 +0000)
src/KERNEL_PY/import_hook.py

index 54c5f1313dec1ee9939d928c8e5eadbf1a35359a..3d628ecab835b9500c677df6e197442c154e1bf1 100755 (executable)
@@ -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