Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
svc-monitor: Avoid NoneType Error in snat_agent.py
The method cleanup_snat_instance in svc_monitor/snat_agent.py can be called with lr_id == None from audit_snat_instances. If that happens, the Python interpreter crashes since line 282 performs a string concatenation of 'rt_' and None, which does not work. The proper thing to do in cleanup_snat_instance, when lr_id == None, seems to be to set rt_obj = None. Why this state has appeared, if errornous, which I do not know, is IMO secondary to the code being executable by the interpreter. Change-Id: I2cf31f956d8992354cc1635c04bc3c807f1db38a Signed-off-by: Martin Millnert <martin@millnert.se> Closes-Bug: #1549755 Closes-Bug: #1549637
- Loading branch information