Record the state_reason regardless of the state transition.

As discussed near the end of #92, we want to record the `state_reason`
string no matter what state we're transition to.
This commit is contained in:
Ralph Bean
2016-10-20 14:26:31 -04:00
parent db09d8e0f3
commit 8f9d4e8403

View File

@@ -187,7 +187,7 @@ class ModuleBuild(RidaBase):
if INVERSE_BUILD_STATES[self.state] in ['done', 'failed']:
self.time_completed = now
if INVERSE_BUILD_STATES[self.state] == "failed" and state_reason:
if state_reason:
self.state_reason = state_reason
log.debug("%r, state %r->%r" % (self, old_state, self.state))