X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fpal.py;h=6d613e339cd7cf8d64098e32b47f48e5e3851d8c;hp=4c5de010d429ffe0e6e810c26084946629bcb01a;hb=55f514061b2da3dd71e13e0a0c5a89797a2773ec;hpb=a576a8096e610a56c098355a567e1a669692d056 diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py index 4c5de010d4..6d613e339c 100644 --- a/resources/tools/presentation/pal.py +++ b/resources/tools/presentation/pal.py @@ -83,39 +83,39 @@ def main(): logging.critical("Finished with error.") sys.exit(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) - generate_report(args.release, spec) - - logging.info("Successfully finished.") - - # except (KeyError, ValueError, PresentationError) as err: - # logging.info("Finished with an error.") - # logging.critical(str(err)) - # except Exception as err: - # logging.info("Finished with an unexpected error.") - # logging.critical(str(err)) - # - # finally: - # if spec is not None and not spec.is_debug: - # clean_environment(spec.environment) - # sys.exit(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) + generate_report(args.release, spec) + + logging.info("Successfully finished.") + + except (KeyError, ValueError, PresentationError) as err: + logging.info("Finished with an error.") + logging.critical(str(err)) + except Exception as err: + logging.info("Finished with an unexpected error.") + logging.critical(str(err)) + + finally: + if spec is not None and not spec.is_debug: + clean_environment(spec.environment) + sys.exit(1) if __name__ == '__main__':