Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #10

Merged
merged 2 commits into from
Oct 23, 2024
Merged

Dev #10

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/mikrokondo_tools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@
#
# SPDX-License-Identifier: MIT
import sys
import traceback
import mikrokondo_tools.utils as u

if __name__ == "__main__":
#from mikrokondo_tools.cli import mikrokondo_tools
from mikrokondo_tools.cli import main
logger = u.get_logger(__name__)

sys.exit(main())
try:
main()
except Exception as e:
errors_out = "errors.txt"
logger.warning("Error encountered appending traceback to %s", errors_out)
with open(errors_out, 'r') as output:
output.write(traceback.format_exc())
error_number = e.errno if hasattr(e, "errno") else -1
SystemExit(error_number)
else:
logger.info("Program finished.")

sys.exit(0)
Loading