evaluator - action wrapper
Change-Id: I1cc581660fee666e13b225e75499c130564e0c8c
This commit is contained in:
parent
825e2537e1
commit
0b0dd235ca
@ -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)
|
@ -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):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user