Skip to content

Commit 6a3188b

Browse files
authored
Merge branch 'master' into more-docs-fixes
2 parents b30d689 + 147f7ca commit 6a3188b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ invoke==2.2.0
88
mock
99
packaging>=20.4
1010
pytest
11-
pytest-asyncio
11+
pytest-asyncio>=0.23.0,<0.24.0
1212
pytest-cov
1313
pytest-profiling
1414
pytest-timeout

redis/_parsers/helpers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,11 @@ def parse_cluster_info(response, **options):
445445
def _parse_node_line(line):
446446
line_items = line.split(" ")
447447
node_id, addr, flags, master_id, ping, pong, epoch, connected = line.split(" ")[:8]
448-
addr = addr.split("@")[0]
448+
ip = addr.split("@")[0]
449+
hostname = addr.split("@")[1].split(",")[1] if "@" in addr and "," in addr else ""
449450
node_dict = {
450451
"node_id": node_id,
452+
"hostname": hostname,
451453
"flags": flags,
452454
"master_id": master_id,
453455
"last_ping_sent": ping,
@@ -460,7 +462,7 @@ def _parse_node_line(line):
460462
if len(line_items) >= 9:
461463
slots, migrations = _parse_slots(line_items[8:])
462464
node_dict["slots"], node_dict["migrations"] = slots, migrations
463-
return addr, node_dict
465+
return ip, node_dict
464466

465467

466468
def _parse_slots(slot_ranges):

0 commit comments

Comments
 (0)