##// END OF EJS Templates
adjust default value of level in sync_imports...
MinRK -
Show More
@@ -457,7 +457,7 b' class DirectView(View):'
457 else:
457 else:
458 user_ns[name] = sys.modules[name]
458 user_ns[name] = sys.modules[name]
459
459
460 def view_import(name, globals={}, locals={}, fromlist=[], level=-1):
460 def view_import(name, globals={}, locals={}, fromlist=[], level=0):
461 """the drop-in replacement for __import__, that optionally imports
461 """the drop-in replacement for __import__, that optionally imports
462 locally as well.
462 locally as well.
463 """
463 """
@@ -478,7 +478,7 b' class DirectView(View):'
478 imp.release_lock()
478 imp.release_lock()
479
479
480 key = name+':'+','.join(fromlist or [])
480 key = name+':'+','.join(fromlist or [])
481 if level == -1 and key not in modules:
481 if level <= 0 and key not in modules:
482 modules.add(key)
482 modules.add(key)
483 if not quiet:
483 if not quiet:
484 if fromlist:
484 if fromlist:
General Comments 0
You need to be logged in to leave comments. Login now