docs: updated Python README to use 127.0.0.1 instead of localhost

This commit is contained in:
Austin Siew 2023-06-14 19:14:50 -06:00
parent 41ce156114
commit f10abcc331

View File

@ -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: