#!/usr/bin/env python3
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2015-2023 Red Hat, Inc.
# Copyright (C) 2017 Microsemi Corporation.
#
# Author: Tony Asleson <tasleson@redhat.com>
#         Gris Ge <fge@redhat.com>
#         Raghavendra Basvan <raghavendra.br@microsemi.com>

import sys
import syslog
import traceback

try:
    from lsm import PluginRunner
    from arcconf_plugin import Arcconf

    if __name__ == '__main__':
        PluginRunner(Arcconf, sys.argv).run()
except Exception:
    # This should be quite rare, but when it does happen this is pretty
    # key in understanding what happened, especially when it happens when
    # running from the daemon.
    msg = str(traceback.format_exc())
    syslog.syslog(syslog.LOG_ERR, msg)
    sys.stderr.write(msg)
    sys.exit(1)
