systemvm: for ip route show command don't use the throw command (#3612)

While searching for existing route, don't use the throw keyword when
using the cmd with `ip route show`.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2019-11-11 23:47:21 +05:30 committed by GitHub
parent 95fbe7c55b
commit ae61bfee76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ class CsRoute:
found = False
search = cmd
if "throw" in search:
search = "type " + search
search = search.replace("throw", "")
for i in CsHelper.execute("ip route show " + search):
found = True
if not found and method == "add":