Skip to content

Commit

Permalink
Don't add nonfunctional proxyconfig plugins in the Settings dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
g1itch committed Jul 2, 2021
1 parent 5fa8115 commit a9488fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/bitmessageqt/settings.py
Expand Up @@ -57,9 +57,16 @@ def __init__(self, parent=None, firstrun=False):
pass
else:
# Append proxy types defined in plugins
# FIXME: this should be a function in mod:`plugin`
for ep in pkg_resources.iter_entry_points(
'bitmessage.proxyconfig'):
self.comboBoxProxyType.addItem(ep.name)
try:
ep.load()
except Exception: # it should add only functional plugins
# many possible exceptions, which are don't matter
pass
else:
self.comboBoxProxyType.addItem(ep.name)

self.lineEditMaxOutboundConnections.setValidator(
QtGui.QIntValidator(0, 8, self.lineEditMaxOutboundConnections))
Expand Down

0 comments on commit a9488fb

Please sign in to comment.