Skip to content

Commit

Permalink
Add a check for none before accessing variable
Browse files Browse the repository at this point in the history
The root cause of the bug was fixed with this review:
https://review.opencontrail.org/#/c/17915/
However, adding a defensive check also in case we still hit the issue.

Change-Id: Ib17229d652c588e3698a5df6c399f8a5264b90f8
Closes-Bug: 1550156
(cherry picked from commit f279c16)
  • Loading branch information
Sachin Bansal committed Feb 27, 2016
1 parent e343e64 commit cb0aabf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/schema-transformer/config_db.py
Expand Up @@ -1937,6 +1937,8 @@ def update_routing_policy_and_aggregates(self):
if not self.service_chain:
return
sc = ServiceChain.get(self.service_chain)
if sc is None:
return
for si_name in sc.service_list:
if not self.name.endswith(si_name.replace(':', '_')):
continue
Expand Down

0 comments on commit cb0aabf

Please sign in to comment.