diff options
author | Julia Kreger <juliaashleykreger@gmail.com> | 2018-05-08 12:21:13 -0700 |
---|---|---|
committer | Julia Kreger <juliaashleykreger@gmail.com> | 2018-05-09 06:11:30 -0700 |
commit | 530a3ed088dd2a21bbf4ca4c9e4c2a62fa2248db (patch) | |
tree | 73685925f7523ea994def0c5280b3e92ae979fc3 /ironic/common/fsm.py | |
parent | 6ff9a6b14c22c2cf640ba7a20828fed976b25f03 (diff) | |
download | ironic-530a3ed088dd2a21bbf4ca4c9e4c2a62fa2248db.tar.gz |
Fix W504 errors
Also a few related errors based on some earlier investigation
may have been pulled in along the lines of E305.
Story: #2001985
Change-Id: Ifb2d3b481202fbd8cbb472e02de0f14f4d0809fd
Diffstat (limited to 'ironic/common/fsm.py')
-rw-r--r-- | ironic/common/fsm.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ironic/common/fsm.py b/ironic/common/fsm.py index 6aab03128..7f1e193bd 100644 --- a/ironic/common/fsm.py +++ b/ironic/common/fsm.py @@ -99,8 +99,8 @@ class FSM(machines.FiniteMachine): def _post_process_event(self, event, result): # Clear '_target_state' if we've reached it - if (self._target_state is not None and - self._target_state == self._current.name): + if (self._target_state is not None + and self._target_state == self._current.name): self._target_state = None # If new state has a different target, update the '_target_state' if self._states[self._current.name]['target'] is not None: @@ -136,8 +136,8 @@ class FSM(machines.FiniteMachine): super(FSM, self).initialize(start_state=start_state) current_state = self._current.name self._validate_target_state(target_state) - self._target_state = (target_state or - self._states[current_state]['target']) + self._target_state = (target_state + or self._states[current_state]['target']) @_translate_excp def process_event(self, event, target_state=None): |