fix exception from network status
This commit is contained in:
parent
4f0e34b4be
commit
cdbe5f80e2
|
@ -195,9 +195,9 @@ class NetworkStatus(QtWidgets.QWidget, RetranslateMixin):
|
|||
if not connectionpool.pool.inboundConnections:
|
||||
self.window().setStatusIcon('yellow')
|
||||
for i in range(self.tableWidgetConnectionCount.rowCount()):
|
||||
if self.tableWidgetConnectionCount.item(i, 0).data(QtCore.Qt.ItemDataRole.UserRole).toPyObject() != destination:
|
||||
if self.tableWidgetConnectionCount.item(i, 0).data(QtCore.Qt.ItemDataRole.UserRole) != destination:
|
||||
continue
|
||||
if self.tableWidgetConnectionCount.item(i, 1).data(QtCore.Qt.ItemDataRole.UserRole).toPyObject() == outbound:
|
||||
if self.tableWidgetConnectionCount.item(i, 1).data(QtCore.Qt.ItemDataRole.UserRole) == outbound:
|
||||
self.tableWidgetConnectionCount.removeRow(i)
|
||||
break
|
||||
|
||||
|
|
|
@ -189,8 +189,8 @@ class Dandelion: # pylint: disable=old-style-class
|
|||
try:
|
||||
# random two connections
|
||||
self.stem = sample(
|
||||
connectionpool.BMConnectionPool(
|
||||
).outboundConnections.values(), MAX_STEMS)
|
||||
sorted(connectionpool.BMConnectionPool(
|
||||
).outboundConnections.values()), MAX_STEMS)
|
||||
# not enough stems available
|
||||
except ValueError:
|
||||
self.stem = connectionpool.BMConnectionPool(
|
||||
|
|
Reference in New Issue
Block a user