def main(args=None):
    parser = setup_parser()
    opts = parser.parse_args(args=args)

    rc = 0

    try:
        opts.func(opts)
    except InsufficientPermissionsError as e:
        puts_err(colored.red("\nInsufficient permissions error:\n") + str(e) + "\n")
        rc = 1
    except BlockadeError as e:
        puts_err(colored.red("\nError:\n") + str(e) + "\n")
        rc = 1

    except __HOLE__:
        puts_err(colored.red("Caught Ctrl-C. exiting!"))

    except:
        puts_err(
            colored.red("\nUnexpected error! This may be a Blockade bug.\n"))
        traceback.print_exc()
        rc = 2

    sys.exit(rc)
dataset/ETHPy150Open dcm-oss/blockade/blockade/cli.py/main