##// END OF EJS Templates
Cast module name to bytes for Py2 ModuleType constructor...
Thomas Kluyver -
Show More
@@ -911,7 +911,8 b' class InteractiveShell(SingletonConfigurable):'
911 try:
911 try:
912 main_mod = self._main_mod_cache[filename]
912 main_mod = self._main_mod_cache[filename]
913 except KeyError:
913 except KeyError:
914 main_mod = self._main_mod_cache[filename] = types.ModuleType(modname,
914 main_mod = self._main_mod_cache[filename] = types.ModuleType(
915 py3compat.cast_bytes_py2(modname),
915 doc="Module created for script run in IPython")
916 doc="Module created for script run in IPython")
916 else:
917 else:
917 main_mod.__dict__.clear()
918 main_mod.__dict__.clear()
General Comments 0
You need to be logged in to leave comments. Login now