[Idle-dev] CVS: idle EditorWindow.py,1.44,1.45
Kurt B. Kaiser
kbk@users.sourceforge.net
Fri, 10 Jan 2003 13:25:23 -0800
Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv2909
Modified Files:
EditorWindow.py
Log Message:
SF bug #652933 (for IdleFork): Open Module "math" Fails (Hettinger)
When a module doesn't have a __path__ attribute, trigger a dialog box
rather than dumping a traceback to the console.
Synch to Python IDLE.
Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** EditorWindow.py 10 Jan 2003 05:07:24 -0000 1.44
--- EditorWindow.py 10 Jan 2003 21:25:20 -0000 1.45
***************
*** 31,35 ****
break # find but not load the source file
module = imp.load_module(tgt, file, filename, descr)
! path = module.__path__
return file, filename, descr
--- 31,38 ----
break # find but not load the source file
module = imp.load_module(tgt, file, filename, descr)
! try:
! path = module.__path__
! except AttributeError:
! raise ImportError, 'No source for module ' + module.__name__
return file, filename, descr