#!/usr/bin/python3.6 -s

try:
    # Cover imports with try/except, to handle errors raised while importing
    # tmt packages. Some may perform actions in import-time, and may raise
    # exceptions.

    # Import utils first, before CLI gets a chance to spawn a logger. Without
    # tmt.utils, we would not be able to intercept the exception below.
    import tmt.utils  # noqa: I001

    import tmt.cli

    tmt.cli.main()

# Basic error message for general errors
except tmt.utils.GeneralError as error:
    tmt.utils.show_exception(error)
    raise SystemExit(2)
