evaluator - action wrapper

Change-Id: I1cc581660fee666e13b225e75499c130564e0c8c
This commit is contained in:
Liat Har-Tal 2016-03-02 06:58:27 +00:00
parent 825e2537e1
commit 0b0dd235ca
2 changed files with 4 additions and 23 deletions

View File

@ -1,23 +0,0 @@
# Copyright 2016 - Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
class ActionWrapper(object):
def __init__(self, func, params):
self.func = func
self.params = params
def activate(self):
self.func(self.params)

View File

@ -13,9 +13,13 @@
# under the License.
import abc
from collections import namedtuple
import six
ActionWrapper = namedtuple('ActionWrapper', ['func', 'params'])
@six.add_metaclass(abc.ABCMeta)
class Action(object):