Fix AttributeError in _clean_updated_sg_member_conntrack_entries()

The conntrack work that recently merged introduced a bug
due to an incorrect 'if' statement, it was only detecting
when one variable was not set instead of both, which can
cause an exception.  This is currently causing jenkins failures
with a number of other changes.

Introduced in Change Id Ibfd2d6a11aa970ea9e5009f4c4b858544d8b7463

Change-Id: I2519fdceefc9255c21d8226cdeffec40a7d444f6
Closes-bug: #1488284
This commit is contained in:
Brian Haley 2015-08-25 09:42:12 -04:00
parent 0ed7e090ff
commit b939672d6b
1 changed files with 1 additions and 1 deletions

View File

@ -757,7 +757,7 @@ class IptablesFirewallDriver(firewall.FirewallDriver):
sec_group_change = False
device_info = self.filtered_ports.get(device)
pre_device_info = self._pre_defer_filtered_ports.get(device)
if not (device_info or pre_device_info):
if not device_info or not pre_device_info:
continue
for sg_id in pre_device_info.get('security_groups', []):
if sg_id not in device_info.get('security_groups', []):