mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
filter plugins that do not have a .py source
This commit is contained in:
parent
45c0880195
commit
6662c1dc53
1 changed files with 1 additions and 0 deletions
|
@ -350,6 +350,7 @@ class ElectrumWindow(QMainWindow):
|
|||
if __builtin__.use_local_modules:
|
||||
fp, pathname, description = imp.find_module('plugins')
|
||||
plugin_names = [name for a, name, b in pkgutil.iter_modules([pathname])]
|
||||
plugin_names = filter( lambda name: os.path.exists(os.path.join(pathname,name+'.py')), plugin_names)
|
||||
imp.load_module('electrum_plugins', fp, pathname, description)
|
||||
self.plugins = map(lambda name: imp.load_source('electrum_plugins.'+name, os.path.join(pathname,name+'.py')), plugin_names)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue