Fixed fetch of connected hosts number in bitmessageqt.support

This commit is contained in:
Dmitri Bogomolov 2017-09-21 13:59:43 +03:00
parent 24a9dc3b37
commit 2504bc6670
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -16,7 +16,7 @@ import paths
import proofofwork import proofofwork
from pyelliptic.openssl import OpenSSL from pyelliptic.openssl import OpenSSL
import queues import queues
import shared import network.stats
import state import state
from version import softwareVersion from version import softwareVersion
@ -124,7 +124,7 @@ def createSupportMessage(myapp):
upnp = BMConfigParser().get('bitmessagesettings', 'upnp') upnp = BMConfigParser().get('bitmessagesettings', 'upnp')
except: except:
upnp = "N/A" upnp = "N/A"
connectedhosts = len(shared.connectedHostsList) connectedhosts = len(network.stats.connectedHostsList())
myapp.ui.textEditMessage.setText(str(QtGui.QApplication.translate("Support", SUPPORT_MESSAGE)).format(version, os, architecture, pythonversion, opensslversion, frozen, portablemode, cpow, openclpow, locale, socks, upnp, connectedhosts)) myapp.ui.textEditMessage.setText(str(QtGui.QApplication.translate("Support", SUPPORT_MESSAGE)).format(version, os, architecture, pythonversion, opensslversion, frozen, portablemode, cpow, openclpow, locale, socks, upnp, connectedhosts))