Merge pull request #4 from petevg/bug/fix-action-wait
authorTim Van Steenburgh <tvansteenburgh@gmail.com>
Fri, 4 Nov 2016 15:06:46 +0000 (11:06 -0400)
committerGitHub <noreply@github.com>
Fri, 4 Nov 2016 15:06:46 +0000 (11:06 -0400)
Fixed status to check for for failed messages in unit.run

juju/model.py

index d63f6d0..953aa8f 100644 (file)
@@ -578,7 +578,7 @@ class Model(object):
             action_id = action_id[7:]
 
         def predicate(delta):
-            return delta.data['status'] in ('completed', 'error')
+            return delta.data['status'] in ('completed', 'failed')
 
         return await self._wait('action', action_id, 'change', predicate)