Commit 0a9ccd35 authored by Marco Mariani's avatar Marco Mariani

renamed state variable

parent 62238a8f
...@@ -295,18 +295,18 @@ class SoftwareReleaseTester(RPCRetry): ...@@ -295,18 +295,18 @@ class SoftwareReleaseTester(RPCRetry):
deadline = self.deadline deadline = self.deadline
if deadline < now and deadline is not None: if deadline < now and deadline is not None:
raise TestTimeout(self.state) raise TestTimeout(self.state)
_, _, state, software_state, instance_state = self.transition_dict[ _, _, next_state, software_state, instance_state = self.transition_dict[
self.state] self.state]
if (software_state is None or if (software_state is None or
software_state == self._getSoftwareState()) and ( software_state == self._getSoftwareState()) and (
instance_state is None or instance_state is None or
instance_state == self._getInstanceState()): instance_state == self._getInstanceState()):
if state is None: if next_state is None:
return None return None
self._logger.debug('Going to state %i (%r, %r)', state, self._logger.debug('Going to state %i (%r, %r)', next_state,
software_state, instance_state) software_state, instance_state)
self.state = state self.state = next_state
stepfunc, delay, _, _, _ = self.transition_dict[state] stepfunc, delay, _, _, _ = self.transition_dict[next_state]
self.deadline = now + delay self.deadline = now + delay
stepfunc(self) stepfunc(self)
return self.deadline return self.deadline
...@@ -422,7 +422,7 @@ def main(): ...@@ -422,7 +422,7 @@ def main():
isinstance(section_entry_dict[key], unicode): isinstance(section_entry_dict[key], unicode):
section_entry_dict[key] = json.loads( section_entry_dict[key] = json.loads(
section_entry_dict[key]) section_entry_dict[key])
except Exception, e: except Exception as exc:
logger.error("Fail to load %s on %s" % (key, section_entry_dict)) logger.error("Fail to load %s on %s" % (key, section_entry_dict))
raise raise
if 'key' in section_entry_dict: if 'key' in section_entry_dict:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment