[Python-checkins]
python/dist/src/Lib/idlelib EditorWindow.py, 1.62,
1.62.2.1 NEWS.txt, 1.49.2.2, 1.49.2.3
kbk at users.sourceforge.net
kbk at users.sourceforge.net
Wed Jan 19 18:25:24 CET 2005
Update of /cvsroot/python/python/dist/src/Lib/idlelib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26431
Modified Files:
Tag: release24-maint
EditorWindow.py NEWS.txt
Log Message:
If an extension can't be loaded, print warning and skip it instead of
erroring out.
Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/EditorWindow.py,v
retrieving revision 1.62
retrieving revision 1.62.2.1
diff -u -d -r1.62 -r1.62.2.1
--- EditorWindow.py 22 Aug 2004 05:14:31 -0000 1.62
+++ EditorWindow.py 19 Jan 2005 17:24:46 -0000 1.62.2.1
@@ -744,7 +744,11 @@
return idleConf.GetExtensions(editor_only=True)
def load_extension(self, name):
- mod = __import__(name, globals(), locals(), [])
+ try:
+ mod = __import__(name, globals(), locals(), [])
+ except ImportError:
+ print "\nFailed to import extension: ", name
+ return None
cls = getattr(mod, name)
keydefs = idleConf.GetExtensionBindings(name)
if hasattr(cls, "menudefs"):
Index: NEWS.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v
retrieving revision 1.49.2.2
retrieving revision 1.49.2.3
diff -u -d -r1.49.2.2 -r1.49.2.3
--- NEWS.txt 19 Jan 2005 17:12:45 -0000 1.49.2.2
+++ NEWS.txt 19 Jan 2005 17:25:05 -0000 1.49.2.3
@@ -3,6 +3,9 @@
*Release date: XX-JAN-2005*
+- If an extension can't be loaded, print warning and skip it instead of
+ erroring out.
+
- Improve error handling when .idlerc can't be created (warn and exit)
- The GUI was hanging if the shell window was closed while a raw_input()
More information about the Python-checkins
mailing list