[Python-checkins] python/dist/src/Tools/idle EditorWindow.py,1.38.18.4,1.38.18.5
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Thu, 20 Feb 2003 20:18:34 -0800
Update of /cvsroot/python/python/dist/src/Tools/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv26701
Modified Files:
Tag: release22-maint
EditorWindow.py
Log Message:
Backport 1.45: Failed module import was dumping to the console instead
of creating a nice dialog window.
Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/idle/EditorWindow.py,v
retrieving revision 1.38.18.4
retrieving revision 1.38.18.5
diff -C2 -d -r1.38.18.4 -r1.38.18.5
*** EditorWindow.py 5 Oct 2002 03:58:16 -0000 1.38.18.4
--- EditorWindow.py 21 Feb 2003 04:18:32 -0000 1.38.18.5
***************
*** 93,97 ****
break # find but not load the source file
module = imp.load_module(tgt, file, filename, descr)
! path = module.__path__
return file, filename, descr
--- 93,100 ----
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