def postprocess_image(test, params): """ Postprocess a single QEMU image according to the instructions in params. @param test: An Autotest test object. @param params: A dict containing image postprocessing parameters. """ if params.get("check_image") == "yes": virt_vm.check_image(params, test.bindir) if params.get("remove_image") == "yes": virt_vm.remove_image(params, test.bindir)
def postprocess_image(test, params): """ Postprocess a single QEMU image according to the instructions in params. @param test: An Autotest test object. @param params: A dict containing image postprocessing parameters. """ if params.get("check_image") == "yes": try: virt_vm.check_image(params, test.bindir) except Exception, e: if params.get("restore_image_on_check_error", "no") == "yes": virt_vm.backup_image(params, test.bindir, 'restore', True) raise e