How to use the rpg.plugin_engine.PluginEngine.get_class function in rpg

To help you get started, we’ve selected a few rpg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rh-lab-q / rpg / rpg / plugin_engine.py View on Github external
def call_method(method, *args, **kwargs):
        try:
            if callable(method):
                ret = method(*args, **kwargs)
                return ret if ret else False
        except Exception as err:
            logging.error(
                "error during executing plugin {}:\n{}".format(
                    PluginEngine.get_class(method).__name__, str(err) + "\n" +
                    ''.join(traceback.format_tb(err.__traceback__))))
        return False