osbuild_cli() sometimes returned an exit code, but at the end called sys.exit() directly. The idea was probably to always return the code with which the executable should exit. Make this consistent and call sys.exit() in __main__.py, with the value returned by osbuild_cli().
14 lines
270 B
Python
Executable file
14 lines
270 B
Python
Executable file
"""OSBuild Main
|
|
|
|
This specifies the entrypoint of the osbuild module when run as executable. For
|
|
compatibility we will continue to run the CLI.
|
|
"""
|
|
|
|
import sys
|
|
|
|
from osbuild.main_cli import osbuild_cli as main
|
|
|
|
|
|
if __name__ == "__main__":
|
|
r = main()
|
|
sys.exit(r)
|