##// END OF EJS Templates
handle failure to get module for globals...
Min RK -
Show More
@@ -197,7 +197,14 b' class InteractiveShellEmbed(TerminalInteractiveShell):'
197 197 local_ns = call_frame.f_locals
198 198 if module is None:
199 199 global_ns = call_frame.f_globals
200 module = sys.modules[global_ns['__name__']]
200 try:
201 module = sys.modules[global_ns['__name__']]
202 except KeyError:
203 warnings.warn("Failed to get module %s" % \
204 global_ns.get('__name__', 'unknown module')
205 )
206 module = DummyMod()
207 module.__dict__ = global_ns
201 208 if compile_flags is None:
202 209 compile_flags = (call_frame.f_code.co_flags &
203 210 compilerop.PyCF_MASK)
General Comments 0
You need to be logged in to leave comments. Login now