Commit a4fe9105 by Todd Owen

unarchive: improve failure detection and reporting

Related to #7777
parent 3fb3e7e6
...@@ -234,7 +234,9 @@ def main(): ...@@ -234,7 +234,9 @@ def main():
# do the unpack # do the unpack
try: 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: except IOError:
module.fail_json(msg="failed to unpack %s to %s" % (src, dest)) module.fail_json(msg="failed to unpack %s to %s" % (src, dest))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment