We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b062fe6 + f0fd45f commit fd0fabaCopy full SHA for fd0faba
1 file changed
cm/chef.py
@@ -140,8 +140,13 @@ def purge_node(node):
140
:param node: a dict containing the id of a node to purge
141
"""
142
client = _get_client()
143
- client.delete_node(node['id'])
144
- client.delete_client(node['id'])
+ node_id = node['id']
+ body, status = client.delete_node(node_id)
145
+ if status != 200:
146
+ raise RuntimeError('Could not purge node {node_id}: {body}'.format(**locals()))
147
+ body, status = client.delete_client(node_id)
148
149
+ raise RuntimeError('Could not purge node client {node_id}: {body}'.format(**locals()))
150
151
152
def converge_controller():
0 commit comments