2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 11:01:09 +00:00

Clean up media error handling

This commit is contained in:
Jarrod Johnson 2018-01-30 15:18:20 -05:00
parent 290ccecfb9
commit 7f3763f9eb
2 changed files with 4 additions and 4 deletions

View File

@ -72,8 +72,7 @@ def attach_media(noderange, media):
resource = '/noderange/{0}/media/attach'.format(noderange)
for res in session.update(resource, {'url': media}):
printerror(res)
if not exitcode:
list_media(noderange, media)
list_media(noderange, media)
def list_media(noderange, media):
@ -140,8 +139,7 @@ def upload_media(noderange, media):
'Nodes had errors receiving media ({0})!\n'.format(allerrnodes))
for node in noderrs:
sys.stderr.write('{0}: {1}\n'.format(node, noderrs[node]))
if not exitcode:
list_media(noderange, media)
list_media(noderange, media)
funmap = {
'upload': upload_media,

View File

@ -355,6 +355,8 @@ def perform_request(operator, node, element,
node,
'Mismatch detected between target certificate fingerprint '
'and pubkeys.tls_hardwaremanager attribute'))
except pygexc.InvalidParameterValue as e:
results.put(msg.ConfluentNodeError(node, str(e)))
except Exception as e:
results.put(e)
finally: