Skip to content

Commit

Permalink
Fixed the possibility of using uninitialized variable in route_check.…
Browse files Browse the repository at this point in the history
…py (#1551)
  • Loading branch information
renukamanavalan authored Apr 7, 2021
1 parent 5976399 commit 50e5c61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/route_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ def check_routes():
rt_asic_miss = []

results = {}
adds = []
deletes = []

selector, subs, rt_asic = get_route_entries()

Expand Down Expand Up @@ -431,8 +433,8 @@ def check_routes():
if results:
print_message(syslog.LOG_WARNING, "Failure results: {", json.dumps(results, indent=4), "}")
print_message(syslog.LOG_WARNING, "Failed. Look at reported mismatches above")
print_message(syslog.LOG_WARNING, "add: {", json.dumps(adds, indent=4), "}")
print_message(syslog.LOG_WARNING, "del: {", json.dumps(deletes, indent=4), "}")
print_message(syslog.LOG_WARNING, "add: ", json.dumps(adds, indent=4))
print_message(syslog.LOG_WARNING, "del: ", json.dumps(deletes, indent=4))
return -1, results
else:
print_message(syslog.LOG_INFO, "All good!")
Expand Down

0 comments on commit 50e5c61

Please sign in to comment.