diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-06-10 16:34:42 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-06-10 16:34:42 +0800 |
commit | 4c207e6433a73ae7c75dc75fca3631e2f02dca95 (patch) | |
tree | ec36daff383438b1a8df2f08c8077d9edfb9ce65 /python/cru/service/__main__.py | |
parent | b63999fd70ed7878569b969c79820e85621dcc2b (diff) | |
download | crupest-4c207e6433a73ae7c75dc75fca3631e2f02dca95.tar.gz crupest-4c207e6433a73ae7c75dc75fca3631e2f02dca95.tar.bz2 crupest-4c207e6433a73ae7c75dc75fca3631e2f02dca95.zip |
refactor: bye, python!
Diffstat (limited to 'python/cru/service/__main__.py')
-rw-r--r-- | python/cru/service/__main__.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/python/cru/service/__main__.py b/python/cru/service/__main__.py deleted file mode 100644 index 2a0268b..0000000 --- a/python/cru/service/__main__.py +++ /dev/null @@ -1,27 +0,0 @@ -import sys - -from cru import CruException - -from ._app import create_app - - -def main(): - app = create_app() - app.run_command() - - -if __name__ == "__main__": - version_info = sys.version_info - if not (version_info.major == 3 and version_info.minor >= 11): - print("This application requires Python 3.11 or later.", file=sys.stderr) - sys.exit(1) - - try: - main() - except CruException as e: - user_message = e.get_user_message() - if user_message is not None: - print(f"Error: {user_message}") - exit(1) - else: - raise |