You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- What I did
Fix show route return command to return error code on failure cases. The parameter return_cmd=True in run_command will suppress the return code and return success even in error scenarios.
- How I did it
When run command is called with return_cmd = True, modified its return to include return code, which can then be used to assess if there is an error by the caller
- How to verify it
Added UT to verify it
- Previous command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show ip route 123
% Unknown command: show ip route 123
root@sonic:/home/admin# echo $?
0
- New command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show ip route 123
% Unknown command: show ip route 123
root@sonic:/home/admin# echo $?
1
0 commit comments