mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
log failure to import plugins or plot module
This commit is contained in:
parent
b29c2a0abd
commit
87f6aa09df
2 changed files with 4 additions and 2 deletions
|
@ -29,11 +29,12 @@ import datetime
|
||||||
from electrum.wallet import AddTransactionException, TX_HEIGHT_LOCAL
|
from electrum.wallet import AddTransactionException, TX_HEIGHT_LOCAL
|
||||||
from .util import *
|
from .util import *
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.util import block_explorer_URL, profiler
|
from electrum.util import block_explorer_URL, profiler, print_error
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from electrum.plot import plot_history, NothingToPlotException
|
from electrum.plot import plot_history, NothingToPlotException
|
||||||
except:
|
except:
|
||||||
|
print_error("qt/history_list: could not import electrum.plot. This feature needs matplotlib to be installed.")
|
||||||
plot_history = None
|
plot_history = None
|
||||||
|
|
||||||
# note: this list needs to be kept in sync with another in kivy
|
# note: this list needs to be kept in sync with another in kivy
|
||||||
|
|
|
@ -132,7 +132,8 @@ class Plugins(DaemonThread):
|
||||||
for dep, s in deps:
|
for dep, s in deps:
|
||||||
try:
|
try:
|
||||||
__import__(dep)
|
__import__(dep)
|
||||||
except ImportError:
|
except ImportError as e:
|
||||||
|
self.print_error('Plugin', name, 'unavailable:', type(e).__name__, ':', str(e))
|
||||||
return False
|
return False
|
||||||
requires = d.get('requires_wallet_type', [])
|
requires = d.get('requires_wallet_type', [])
|
||||||
return not requires or w.wallet_type in requires
|
return not requires or w.wallet_type in requires
|
||||||
|
|
Loading…
Add table
Reference in a new issue