docs: updated Python README to use 127.0.0.1 instead of localhost
This commit is contained in:
parent
41ce156114
commit
f10abcc331
@ -102,7 +102,7 @@ def request(action, **params):
|
|||||||
|
|
||||||
def invoke(action, **params):
|
def invoke(action, **params):
|
||||||
requestJson = json.dumps(request(action, **params)).encode('utf-8')
|
requestJson = json.dumps(request(action, **params)).encode('utf-8')
|
||||||
response = json.load(urllib.request.urlopen(urllib.request.Request('http://localhost:8765', requestJson)))
|
response = json.load(urllib.request.urlopen(urllib.request.Request('http://127.0.0.1:8765', requestJson)))
|
||||||
if len(response) != 2:
|
if len(response) != 2:
|
||||||
raise Exception('response has an unexpected number of fields')
|
raise Exception('response has an unexpected number of fields')
|
||||||
if 'error' not in response:
|
if 'error' not in response:
|
||||||
|
Loading…
Reference in New Issue
Block a user