diff MoinMoin/util/pysupport.py @ 51:54d5932d5a03

merge moin--main--1.3--patch-930: fix error handling in plugins, fix broken chart action Patches applied: * arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-930 fix error handling in plugins, fix broken chart action * nirs@freeshell.org--2005/moin--fix--1.3--patch-50 merge from main * nirs@freeshell.org--2005/moin--fix--1.3--patch-51 fix error handling in plugins * nirs@freeshell.org--2005/moin--fix--1.3--patch-52 merge from main * nirs@freeshell.org--2005/moin--fix--1.3--patch-53 update changes with chart action fix imported from: moin--main--1.5--patch-52
author Nir Soffer <nirs@freeshell.org>
date Thu, 29 Sep 2005 00:36:27 +0000
parents 77665d8e2254
children ca35d9e6d63e
line wrap: on
line diff
--- a/MoinMoin/util/pysupport.py	Thu Sep 29 00:09:43 2005 +0000
+++ b/MoinMoin/util/pysupport.py	Thu Sep 29 00:36:27 2005 +0000
@@ -57,17 +57,16 @@
 
     Used to do dynamic import of modules and names that you know their
     names only in runtime.
+
+    Any error raised here must be handled by the caller.
     
     @param modulename: full qualified mudule name, e.g. x.y.z
     @param name: name to import from modulename
     @rtype: any object
-    @return: name from module or None if there is no such name
+    @return: name from module
     """
-    try:
-        module = __import__(modulename, globals(), {}, [name])
-        return getattr(module, name, None)
-    except ImportError:
-        return None
+    module = __import__(modulename, globals(), {}, [name])
+    return getattr(module, name)
 
 
 def makeThreadSafe(function, lock=None):