mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Do not attempt to list after error
On upload/attach errors, do not bother to try to follow up with list media, as the previous failure is more useful.
This commit is contained in:
parent
36e68ca852
commit
0431e42452
@ -72,7 +72,8 @@ def attach_media(noderange, media):
|
||||
resource = '/noderange/{0}/media/attach'.format(noderange)
|
||||
for res in session.update(resource, {'url': media}):
|
||||
printerror(res)
|
||||
list_media(noderange, media)
|
||||
if not exitcode:
|
||||
list_media(noderange, media)
|
||||
|
||||
|
||||
def list_media(noderange, media):
|
||||
@ -135,7 +136,8 @@ 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]))
|
||||
list_media(noderange, media)
|
||||
if not exitcode:
|
||||
list_media(noderange, media)
|
||||
|
||||
funmap = {
|
||||
'upload': upload_media,
|
||||
|
Loading…
Reference in New Issue
Block a user