diff options
| author | ianb <devnull@localhost> | 2005-05-16 03:49:12 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-05-16 03:49:12 +0000 |
| commit | c552be340632df607536f4db4507d059f46ddcf4 (patch) | |
| tree | fcdb694457cbb5a24952b5dea3f45d86588dc5fa /paste/util | |
| parent | e8c47309821205d08c4e552169ed80ff782c7411 (diff) | |
| download | paste-c552be340632df607536f4db4507d059f46ddcf4.tar.gz | |
Added framework plugins
Diffstat (limited to 'paste/util')
| -rw-r--r-- | paste/util/plugin.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/paste/util/plugin.py b/paste/util/plugin.py index 442a7a6..450a6e4 100644 --- a/paste/util/plugin.py +++ b/paste/util/plugin.py @@ -50,10 +50,7 @@ def load_plugin_module(dir, dir_package, name, name_extension=''): module_name = parse_txt_plugin(os.path.join(dir, txt_name)) else: module_name = dir_package + '.' + name + name_extension - try: - return import_string.import_module(module_name) - except ImportError, e: - raise PluginNotFound(str(e)) + return import_string.import_module(module_name) def parse_txt_plugin(fn): f = open(fn) @@ -67,6 +64,7 @@ def parse_txt_plugin(fn): raise PluginNotFound( "Plugin file %s contains more than one line that " "could be interpreted as a module name" % fn) + module_name = line if module_name is None: raise PluginNotFound( "Plugin file %s does not contain a module name" % fn) |
