def test_all(source_dir, source_ext, source_format, dest_ef_pairs): locale.setlocale(locale.LC_ALL, '') timezones.init() n = 0 for dest_ext, dest_format in dest_ef_pairs: n += test_one(source_dir, source_ext, source_format, dest_ext, dest_format, stop=False) return n
def cleanup(exitcode): progress = None for w in WORKERS: progress = w.progress w.stop() for w in WORKERS: w.join() if progress: progress.print_status('done') exitcode += progress.nerror if not const.VERBOSE: print_('') return exitcode if __name__ == "__main__": options = parse_args() exitcode = 0 try: timezones.init() exitcode = main(options) except KeyboardInterrupt: exitcode = 1 print_e("***aborted***") except Exception as e: exitcode = 1 traceback.print_exc() finally: sys.exit(cleanup(exitcode))
progress = None for w in WORKERS: progress = w.progress w.stop() for w in WORKERS: w.join() if progress: progress.print_status("done") exitcode += progress.nerror if not const.VERBOSE: print_("") return exitcode if __name__ == "__main__": options = parse_args() exitcode = 0 try: timezones.init() exitcode = main(options) except KeyboardInterrupt: exitcode = 1 print_e("***aborted***") except Exception as e: exitcode = 1 traceback.print_exc() finally: sys.exit(cleanup(exitcode))