Skip to content

Commit 5837559

Browse files
stepanblyschakjudyjoseph
authored andcommitted
[show] fix get routing stack routine (#2137)
- What I did Fixed error message: "Failed to get routing stack: a bytes-like object is required, not 'str'" introduced by #2117 - How I did it Add missing 'text' parameter - How to verify it Run on switch Signed-off-by: Stepan Blyschak <[email protected]>
1 parent c888f29 commit 5837559

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

show/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def get_routing_stack():
7777
command = "sudo docker ps | grep bgp | awk '{print$2}' | cut -d'-' -f3 | cut -d':' -f1 | head -n 1"
7878

7979
try:
80-
stdout = subprocess.check_output(command, shell=True, timeout=COMMAND_TIMEOUT)
80+
stdout = subprocess.check_output(command, shell=True, text=True, timeout=COMMAND_TIMEOUT)
8181
result = stdout.rstrip('\n')
8282
except Exception as err:
8383
click.echo('Failed to get routing stack: {}'.format(err), err=True)

0 commit comments

Comments
 (0)