def main(args=None):
    """Call the CLI interface and wait for the result."""
    retcode = 0
    try:
        ci = CliInterface()
        args = ci.parser.parse_args()
        result = args.func(args)
        if result is not None:
            print(result)
        retcode = 0
    except Exception:
        retcode = 1
        traceback.print_exc()
    sys.exit(retcode)
Call the CLI interface and wait for the result.