fix plugin manager

This commit is contained in:
Denis Fomin 2013-01-11 19:54:52 +04:00
parent f6e5738832
commit de9241ac11
2 changed files with 5 additions and 4 deletions

View File

@ -203,8 +203,7 @@ class GajimPluginConfig():
def __init__(self, plugin):
self.plugin = plugin
self.FILE_PATH = os.path.join(gajim.PLUGINS_CONFIG_DIR,
self.plugin.short_name).decode('utf-8').encode(
locale.getpreferredencoding())
self.plugin.short_name).encode(locale.getpreferredencoding())
self.data = {}
@log_calls('GajimPluginConfig')

View File

@ -468,7 +468,10 @@ class PluginManager(object):
os.path.dirname(file_path))
# read metadata from manifest.ini
conf.readfp(open(manifest_path, 'r'))
conf_file = open(manifest_path)
conf.read_file(conf_file)
conf_file.close()
for option in fields:
if conf.get('info', option) is '':
raise configparser.NoOptionError('field empty')
@ -476,7 +479,6 @@ class PluginManager(object):
conf.remove_section('info')
plugins_found.append(module_attr)
except TypeError:
# set plugin localization
try: