From a703be42da210fe18fa5682acd9898b5cecb4020 Mon Sep 17 00:00:00 2001 From: Renaud Le Gac <renaud.legac@free.fr> Date: Thu, 31 Mar 2011 20:06:52 +0000 Subject: [PATCH] Polish the function get_plugin_path: return None when the plugin is not found. --- modules/plugin_dbui/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugin_dbui/helper.py b/modules/plugin_dbui/helper.py index f40bddf4..8cbea4fe 100644 --- a/modules/plugin_dbui/helper.py +++ b/modules/plugin_dbui/helper.py @@ -64,7 +64,7 @@ def get_plugin_path(environment, plugin_name): The dictionary environment contains the keys request, response, session, plugins, .... - Raise the exception HTTP(500) if the plugin is not found. + Return None if the plugin is not found. """ server_path, client_path = get_reference_paths(environment) @@ -77,7 +77,7 @@ def get_plugin_path(environment, plugin_name): return os.path.join(client_path, 'static', el) # Nothing found - raise HTTP(500, 'The plugin %s is not install !' % plugin_name) + return None def get_js_files(server_path, client_path, directory): -- GitLab