X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fpal.py;h=aaeacaac15cca7b1cc28da5776e1662de127d346;hp=85b7bbc3709cdf8d42abd4254eb0d679c1149573;hb=f2f19bad6847e315366e5e9ab4952fded0097b1f;hpb=efdcf6470f6e15dcc918c70e5a61d10e10653f1e diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py index 85b7bbc370..aaeacaac15 100644 --- a/resources/tools/presentation/pal.py +++ b/resources/tools/presentation/pal.py @@ -86,50 +86,49 @@ def main(): logging.critical("Finished with error.") return 1 - ret_code = 1 - try: - env = Environment(spec.environment, args.force) - env.set_environment() - - if spec.is_debug: - if spec.debug["input-format"] == "zip": - unzip_files(spec) - else: - download_data_files(spec) - - prepare_static_content(spec) - - data = InputData(spec) - data.read_data() - - generate_tables(spec, data) - generate_plots(spec, data) - generate_files(spec, data) - - if spec.output["output"] == "report": - generate_report(args.release, spec) - logging.info("Successfully finished.") - ret_code = 0 - elif spec.output["output"] == "CPTA": - ret_code = generate_cpta(spec, data) - logging.info("Successfully finished.") - else: - logging.critical("The output '{0}' is not supported.". - format(spec.output["output"])) - ret_code = 1 - - except (KeyError, ValueError, PresentationError) as err: - logging.info("Finished with an error.") - logging.critical(str(err)) - ret_code = 1 - except Exception as err: - logging.info("Finished with an unexpected error.") - logging.critical(str(err)) + ret_code = 0 + # try: + env = Environment(spec.environment, args.force) + env.set_environment() + + if spec.is_debug: + if spec.debug["input-format"] == "zip": + unzip_files(spec) + else: + download_data_files(spec) + + prepare_static_content(spec) + + data = InputData(spec) + data.read_data() + + generate_tables(spec, data) + generate_plots(spec, data) + generate_files(spec, data) + + if spec.output["output"] == "report": + generate_report(args.release, spec) + logging.info("Successfully finished.") + elif spec.output["output"] == "CPTA": + sys.stdout.write(generate_cpta(spec, data)) + logging.info("Successfully finished.") + else: + logging.critical("The output '{0}' is not supported.". + format(spec.output["output"])) ret_code = 1 - finally: - if spec is not None and not spec.is_debug: - clean_environment(spec.environment) - return ret_code + + # except (KeyError, ValueError, PresentationError) as err: + # logging.info("Finished with an error.") + # logging.critical(str(err)) + # ret_code = 1 + # except Exception as err: + # logging.info("Finished with an unexpected error.") + # logging.critical(str(err)) + # ret_code = 1 + # finally: + # if spec is not None and not spec.is_debug: + # clean_environment(spec.environment) + # return ret_code if __name__ == '__main__':