Add an empty __init__ method to the base Action class
Without this, the action loading will fail in Python 2 if the action subclass doesn't define a __init__. Closes-Bug: #1724594 Change-Id: I7cf9fdc9446462c7f5010d0ba8b307b05656704e
This commit is contained in:
parent
b536da8d01
commit
ff1e58332f
|
@ -33,6 +33,12 @@ class Action(object):
|
|||
specification (e.g. using DSL or others).
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
# NOTE(d0ugal): We need to define an empty __init__ otherwise
|
||||
# inspect.getargspec will fail in Python 2 for actions that subclass
|
||||
# but don't define their own __init__.
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def run(self, context):
|
||||
"""Run action logic.
|
||||
|
|
Loading…
Reference in New Issue