From c84ae560895ee508a8a1cc10becac0d59973942f Mon Sep 17 00:00:00 2001 From: Dmitry Shulyak Date: Thu, 23 Jul 2015 10:31:33 +0300 Subject: [PATCH] Handle puppet error during remove as WARNING in example-puppet.py --- example-puppet.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/example-puppet.py b/example-puppet.py index 7f344aad..fb408765 100644 --- a/example-puppet.py +++ b/example-puppet.py @@ -7,6 +7,7 @@ from solar.core import resource from solar.core import signals from solar.core import validation from solar.core.resource import virtual_resource as vr +from solar import errors from solar.interfaces.db import get_db @@ -347,7 +348,10 @@ def undeploy(): resources = {r.name: r for r in resources} for name in to_remove: - actions.resource_action(resources[name], 'remove') + try: + actions.resource_action(resources[name], 'remove') + except errors.SolarError as e: + print 'WARNING: %s' % str(e) #actions.resource_action(resources['nova_keystone_service_endpoint'], 'remove' ) # actions.resource_action(resources['nova_network_puppet'], 'remove' )