Skip to content

Commit 22a388b

Browse files
[show] fix get routing stack routine (sonic-net#2137)
- What I did Fixed error message: "Failed to get routing stack: a bytes-like object is required, not 'str'" introduced by sonic-net#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 cb3a047 commit 22a388b

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
@@ -78,7 +78,7 @@ def get_routing_stack():
7878
command = "sudo docker ps | grep bgp | awk '{print$2}' | cut -d'-' -f3 | cut -d':' -f1 | head -n 1"
7979

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

0 commit comments

Comments
 (0)