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 | 4abd6020df12427aed62599a68abba87b1ccc3b8 (patch) | |
tree | e2504019eb8663ef0e49d409b2ca279030c70c60 /python/cru/service/__main__.py | |
parent | 73d711416dc50378321982c88fe01e48ea18e20a (diff) | |
download | crupest-4abd6020df12427aed62599a68abba87b1ccc3b8.tar.gz crupest-4abd6020df12427aed62599a68abba87b1ccc3b8.tar.bz2 crupest-4abd6020df12427aed62599a68abba87b1ccc3b8.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 |