From 8b932ade2d26d0ee3b5d4b69b4ea096bc588b4fa Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 13 Feb 2018 00:50:47 +0200 Subject: [PATCH] No "getinfo" in modern namecoind - try "getnetworkinfo" --- src/namecoin.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/namecoin.py b/src/namecoin.py index 2cfa5a1d..1124bbeb 100644 --- a/src/namecoin.py +++ b/src/namecoin.py @@ -129,12 +129,14 @@ class namecoinConnection (object): # Test the connection settings. This routine tries to query a "getinfo" # command, and builds either an error message or a success message with # some info from it. - def test (self): + def test(self): try: if self.nmctype == "namecoind": - res = self.callRPC ("getinfo", []) - vers = res["version"] - + try: + vers = self.callRPC("getinfo", [])["version"] + except RPCError: + vers = self.callRPC("getnetworkinfo", [])["version"] + v3 = vers % 100 vers = vers / 100 v2 = vers % 100