Raise an exception when plugin is not found instead of returning None in i18n.getPluginDir()

This commit is contained in:
Valentin Lorentz 2011-06-17 15:36:38 +02:00
parent 4f91a62f27
commit ebb3aae81c
1 changed files with 1 additions and 1 deletions

View File

@ -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