コード例 #1
0
def execute(instance, **data):
    try:
        data_type = data.pop('type')
        function = REGISTRY.function(data_type)
        if not function:
            raise Exception("Didn't understand data type %s" % type)

        return function(instance, data_type=type, **data)

    except Exception:
        LOGGER.error()
コード例 #2
0
ファイル: Remote.py プロジェクト: TopRamenGod/echomesh
def execute(instance, **data):
    try:
        data_type = data.pop('type')
        function = REGISTRY.function(data_type)
        if not function:
            raise Exception("Didn't understand data type %s" % type)

        return function(instance, data_type=type, **data)

    except Exception:
        LOGGER.error()