diff --git a/certbot/certbot/_internal/main.py b/certbot/certbot/_internal/main.py index d697dc5b7..c674efd79 100644 --- a/certbot/certbot/_internal/main.py +++ b/certbot/certbot/_internal/main.py @@ -1348,10 +1348,3 @@ def main(cli_args=None): util.atexit_register(report.print_messages) return config.func(config, plugins) - - -if __name__ == "__main__": - err_string = main() - if err_string: - logger.warning("Exiting with message %s", err_string) - sys.exit(err_string) # pragma: no cover diff --git a/certbot/certbot/main.py b/certbot/certbot/main.py index b5b61e5a0..6aff07c4e 100644 --- a/certbot/certbot/main.py +++ b/certbot/certbot/main.py @@ -11,10 +11,3 @@ logger = logging.getLogger(__name__) def main(*args, **kwargs): """Shim around internal main function""" return internal_main.main(*args, **kwargs) - - -if __name__ == "__main__": - err_string = main() - if err_string: - logger.warning("Exiting with message %s", err_string) - sys.exit(err_string) # pragma: no cover