Don't add nonfunctional proxyconfig plugins in the Settings dialog
This commit is contained in:
parent
5fa8115273
commit
a9488fb120
|
@ -57,9 +57,16 @@ class SettingsDialog(QtGui.QDialog):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
# Append proxy types defined in plugins
|
# Append proxy types defined in plugins
|
||||||
|
# FIXME: this should be a function in mod:`plugin`
|
||||||
for ep in pkg_resources.iter_entry_points(
|
for ep in pkg_resources.iter_entry_points(
|
||||||
'bitmessage.proxyconfig'):
|
'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(
|
self.lineEditMaxOutboundConnections.setValidator(
|
||||||
QtGui.QIntValidator(0, 8, self.lineEditMaxOutboundConnections))
|
QtGui.QIntValidator(0, 8, self.lineEditMaxOutboundConnections))
|
||||||
|
|
Reference in New Issue
Block a user