From ebb3aae81c13db0bb7c4a185ab13b2713e104db4 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 17 Jun 2011 15:36:38 +0200 Subject: [PATCH] Raise an exception when plugin is not found instead of returning None in i18n.getPluginDir() --- src/i18n.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n.py b/src/i18n.py index 8c812d212..3f64a82c9 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -88,7 +88,7 @@ def getPluginDir(plugin_name): for allowed_file in allowed_files: if filename.endswith(allowed_file): return filename[0:-len(allowed_file)] - return + raise Exception('Plugin %s not found by i18n.' % plugin_name) def getLocalePath(name, localeName, extension): """Gets the path of the locale file of the given plugin ('supybot' stands