def main():

    logging.basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")

    # Only mangle the terminal if using Python 2.x
    if sys.version_info[0] == 2:
        sys.stdout = codecs.getwriter('utf-8')(sys.stdout)

    try:
        AlertaShell().run()
    except (__HOLE__, KeyboardInterrupt):
        LOG.warning("Exiting alerta client.")
        sys.exit(0)
    except Exception as e:
        LOG.error(e, exc_info=1)
        sys.exit(1)
dataset/ETHPy150Open alerta/python-alerta/alerta/shell.py/main