Commits

Kurt B. Kaiser committed 7d99981

If an extension can't be loaded, print warning and skip it instead of
erroring out.

Comments (0)

Files changed (2)

Lib/idlelib/EditorWindow.py

         return idleConf.GetExtensions()
 
     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)
         ins = cls(self)
         self.extensions[name] = ins

Lib/idlelib/NEWS.txt

 
 *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.  This is a partial
   backport of configHandler.py, Revision 1.36,  11Jan05.