No "getinfo" in modern namecoind - try "getnetworkinfo"
This commit is contained in:
parent
4ba5702cc2
commit
8b932ade2d
|
@ -129,12 +129,14 @@ class namecoinConnection (object):
|
||||||
# Test the connection settings. This routine tries to query a "getinfo"
|
# Test the connection settings. This routine tries to query a "getinfo"
|
||||||
# command, and builds either an error message or a success message with
|
# command, and builds either an error message or a success message with
|
||||||
# some info from it.
|
# some info from it.
|
||||||
def test (self):
|
def test(self):
|
||||||
try:
|
try:
|
||||||
if self.nmctype == "namecoind":
|
if self.nmctype == "namecoind":
|
||||||
res = self.callRPC ("getinfo", [])
|
try:
|
||||||
vers = res["version"]
|
vers = self.callRPC("getinfo", [])["version"]
|
||||||
|
except RPCError:
|
||||||
|
vers = self.callRPC("getnetworkinfo", [])["version"]
|
||||||
|
|
||||||
v3 = vers % 100
|
v3 = vers % 100
|
||||||
vers = vers / 100
|
vers = vers / 100
|
||||||
v2 = vers % 100
|
v2 = vers % 100
|
||||||
|
|
Reference in New Issue
Block a user