From 5b645ae2ad9c3bc84bf95a30a77089b3f5fbc548 Mon Sep 17 00:00:00 2001 From: reivilibre Date: Tue, 14 Jun 2022 18:41:06 +0100 Subject: Refactor entry points so that they all have a `main` function. (#13052) --- synapse/app/event_creator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'synapse/app/event_creator.py') diff --git a/synapse/app/event_creator.py b/synapse/app/event_creator.py index 885454ed44..7995d99825 100644 --- a/synapse/app/event_creator.py +++ b/synapse/app/event_creator.py @@ -17,6 +17,11 @@ import sys from synapse.app.generic_worker import start from synapse.util.logcontext import LoggingContext -if __name__ == "__main__": + +def main() -> None: with LoggingContext("main"): start(sys.argv[1:]) + + +if __name__ == "__main__": + main() -- cgit 1.5.1