fix plugin manager
This commit is contained in:
parent
f6e5738832
commit
de9241ac11
2 changed files with 5 additions and 4 deletions
|
@ -203,8 +203,7 @@ class GajimPluginConfig():
|
||||||
def __init__(self, plugin):
|
def __init__(self, plugin):
|
||||||
self.plugin = plugin
|
self.plugin = plugin
|
||||||
self.FILE_PATH = os.path.join(gajim.PLUGINS_CONFIG_DIR,
|
self.FILE_PATH = os.path.join(gajim.PLUGINS_CONFIG_DIR,
|
||||||
self.plugin.short_name).decode('utf-8').encode(
|
self.plugin.short_name).encode(locale.getpreferredencoding())
|
||||||
locale.getpreferredencoding())
|
|
||||||
self.data = {}
|
self.data = {}
|
||||||
|
|
||||||
@log_calls('GajimPluginConfig')
|
@log_calls('GajimPluginConfig')
|
||||||
|
|
|
@ -468,7 +468,10 @@ class PluginManager(object):
|
||||||
os.path.dirname(file_path))
|
os.path.dirname(file_path))
|
||||||
|
|
||||||
# read metadata from manifest.ini
|
# 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:
|
for option in fields:
|
||||||
if conf.get('info', option) is '':
|
if conf.get('info', option) is '':
|
||||||
raise configparser.NoOptionError('field empty')
|
raise configparser.NoOptionError('field empty')
|
||||||
|
@ -476,7 +479,6 @@ class PluginManager(object):
|
||||||
conf.remove_section('info')
|
conf.remove_section('info')
|
||||||
|
|
||||||
plugins_found.append(module_attr)
|
plugins_found.append(module_attr)
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# set plugin localization
|
# set plugin localization
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue