diff options
author | Brian Haley <bhaley@redhat.com> | 2018-04-10 16:17:36 -0400 |
---|---|---|
committer | Brian Haley <haleyb.dev@gmail.com> | 2018-04-17 14:22:58 +0000 |
commit | 90cd939047b448117a8fc50852721671221d6dc1 (patch) | |
tree | 39b427d2907445a93ece8b670025a5ac5cfaca09 /neutron/notifiers | |
parent | c16d15fff2953c7427dc2671dc479d044d5b90c3 (diff) | |
download | neutron-90cd939047b448117a8fc50852721671221d6dc1.tar.gz |
Fix W503 pep8 warnings
Fix W503 (line break before binary operator) pep8 warnings
and no longer ignore new failures.
Trivialfix
Change-Id: I7539f3b7187f2ad40681781f74b6e05a01bac474
Diffstat (limited to 'neutron/notifiers')
-rw-r--r-- | neutron/notifiers/nova.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/neutron/notifiers/nova.py b/neutron/notifiers/nova.py index 29d00ae075..b3b996349b 100644 --- a/neutron/notifiers/nova.py +++ b/neutron/notifiers/nova.py @@ -76,8 +76,9 @@ class Notifier(object): def _is_compute_port(self, port): try: - if (port['device_id'] and uuidutils.is_uuid_like(port['device_id']) - and port['device_owner'].startswith( + if (port['device_id'] and + uuidutils.is_uuid_like(port['device_id']) and + port['device_owner'].startswith( constants.DEVICE_OWNER_COMPUTE_PREFIX)): return True except (KeyError, AttributeError): @@ -116,9 +117,9 @@ class Notifier(object): # port to a new instance port without disassociate it first, an # event should be sent for original instance, that will make nova # know original instance's info, and update database for it. - if (action == 'update_floatingip' - and returned_obj['floatingip'].get('port_id') - and original_obj.get('port_id')): + if (action == 'update_floatingip' and + returned_obj['floatingip'].get('port_id') and + original_obj.get('port_id')): disassociate_returned_obj = {'floatingip': {'port_id': None}} event = self.create_port_changed_event(action, original_obj, disassociate_returned_obj) @@ -194,9 +195,9 @@ class Notifier(object): # NO_VALUE/DOWN/BUILD -> ACTIVE/ERROR. elif (previous_port_status in [sql_attr.NO_VALUE, constants.PORT_STATUS_DOWN, - constants.PORT_STATUS_BUILD] - and current_port_status in [constants.PORT_STATUS_ACTIVE, - constants.PORT_STATUS_ERROR]): + constants.PORT_STATUS_BUILD] and + current_port_status in [constants.PORT_STATUS_ACTIVE, + constants.PORT_STATUS_ERROR]): event_name = VIF_PLUGGED # All the remaining state transitions are of no interest to nova else: |