Save the resource if complete or failed

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2012-04-18 16:14:24 +10:00
parent 777d2f3a56
commit 770224c050
1 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,8 @@ class Resource(object):
def state_set(self, new_state, reason="state changed"):
if new_state is self.CREATE_COMPLETE:
if new_state is self.CREATE_COMPLETE or \
new_state is self.CREATE_FAILED:
try:
rs = {}
rs['state'] = new_state