Mercurial > srxproxy
changeset 33:080c74b95136
oink!
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Wed, 13 Feb 2013 13:56:34 +0100 |
| parents | 0d38307952e7 |
| children | 29b0aa997665 |
| files | srxproxy.py |
| diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/srxproxy.py Wed Feb 13 13:46:43 2013 +0100 +++ b/srxproxy.py Wed Feb 13 13:56:34 2013 +0100 @@ -171,11 +171,11 @@ context, floating_ip, ) - old_fixed_ip_ref = nm.db.fixed_ip_get( - context, - floating_ip_ref['fixed_ip_id'], - ) - instance_ids.add(old_fixed_ip_ref) + fixed_ip_id = floating_ip_ref['fixed_ip_id'] + if fixed_ip_id: + old_fixed_ip_ref = nm.db.fixed_ip_get(context, fixed_ip_id) + if old_fixed_ip_ref and old_fixed_ip_ref['instance_id']: + instance_ids.add(old_fixed_ip_ref['instance_id']) for id_ in instance_ids: instance = nm.db.instance_get(context, id_) nm.get_instance_nw_info(
