1
0

check gui when loading plugins

This commit is contained in:
ThomasV
2015-05-24 09:26:28 +02:00
parent a48a7951a7
commit d40c12c949
3 changed files with 32 additions and 22 deletions

View File

@@ -24,7 +24,7 @@ import pkgutil
from util import *
from i18n import _
from util import print_error
from util import print_error, profiler
plugins = {}
descriptions = []
@@ -49,7 +49,8 @@ def is_available(name, w):
return True
def init_plugins(config, is_local, is_gui):
@profiler
def init_plugins(config, is_local, gui_name):
global plugins, descriptions, loader
if is_local:
fp, pathname, description = imp.find_module('plugins')
@@ -73,6 +74,8 @@ def init_plugins(config, is_local, is_gui):
descriptions = electrum_plugins.descriptions
for item in descriptions:
name = item['name']
if gui_name not in item.get('available_for', []):
continue
if item.get('registers_wallet_type'):
register_wallet_type(name)
if not config.get('use_' + name):