def main():

    # Do this first so people can see the help message...
    args = opts.parse(load_previous_settings())

    # Configure logging levels
    log_level = logging.INFO
    if args['verbose']:
        log_level = logging.DEBUG
    logging.setupLogging(log_level, tee_filename=args['tee_file'])
    LOG.debug("Log level is: %s" % (logging.getLevelName(log_level)))

    def print_exc(exc):
        if not exc:
            return
        msg = str(exc).strip()
        if not msg:
            return
        if not (msg.endswith(".") or msg.endswith("!")):
            msg = msg + "."
        if msg:
            print(msg)

    def print_traceback():
        traceback = None
        if log_level < logging.INFO:
            # See: http://docs.python.org/library/traceback.html
            # When its not none u get more detailed info about the exception
            traceback = sys.exc_traceback
        tb.print_exception(sys.exc_type, sys.exc_value,
                           traceback, file=sys.stdout)

    try:
        run(args)
        utils.goodbye(True)
        return 0
    except excp.PermException as e:
        print_exc(e)
        print(("This program should be running via %s as it performs some root-only commands is it not?")
              % (colorizer.quote('sudo', quote_color='red')))
        return 2
    except excp.OptionException as e:
        print_exc(e)
        print("Perhaps you should try %s" % (colorizer.quote('--help', quote_color='red')))
        return 1
    except Exception:
        utils.goodbye(False)
        print_traceback()
        return 1
Starts the execution of anvil without injecting variables into
dataset/ETHPy150Open openstack/anvil/anvil/__main__.py/main