def main(args=None):
    try:
        if args is None:
            args = sys.argv[1:]

        SenlinShell().main(args)
    except __HOLE__:
        print(_("... terminating senlin client"), file=sys.stderr)
        sys.exit(130)
    except Exception as e:
        if '--debug' in args or '-d' in args:
            raise
        else:
            print(encodeutils.safe_encode(six.text_type(e)), file=sys.stderr)
        sys.exit(1)
dataset/ETHPy150Open openstack/python-senlinclient/senlinclient/shell.py/main