Skip to content

Commit 8b932ad

Browse files
committed
No "getinfo" in modern namecoind - try "getnetworkinfo"
1 parent 4ba5702 commit 8b932ad

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/namecoin.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ def query (self, string):
129129
# Test the connection settings. This routine tries to query a "getinfo"
130130
# command, and builds either an error message or a success message with
131131
# some info from it.
132-
def test (self):
132+
def test(self):
133133
try:
134134
if self.nmctype == "namecoind":
135-
res = self.callRPC ("getinfo", [])
136-
vers = res["version"]
137-
135+
try:
136+
vers = self.callRPC("getinfo", [])["version"]
137+
except RPCError:
138+
vers = self.callRPC("getnetworkinfo", [])["version"]
139+
138140
v3 = vers % 100
139141
vers = vers / 100
140142
v2 = vers % 100

0 commit comments

Comments
 (0)