unarchive: improve failure detection and reporting

Related to #7777
reviewable/pr18780/r1
Todd Owen 11 years ago
parent de94863eb1
commit 2b9402dc5c

@ -234,7 +234,9 @@ def main():
# do the unpack
try:
results = handler.unarchive()
res_args['extract_results'] = handler.unarchive()
if res_args['extract_results']['rc'] != 0:
module.fail_json(msg="failed to unpack %s to %s" % (src, dest), **res_args)
except IOError:
module.fail_json(msg="failed to unpack %s to %s" % (src, dest))

Loading…
Cancel
Save