mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-22 20:01:55 +00:00
Add docstrings to YamlFSM
This commit is contained in:
parent
8df196f258
commit
732b896d17
@ -13,7 +13,17 @@ from tfw.fsm.fsm_base import FSMBase
|
||||
|
||||
|
||||
class YamlFSM(FSMBase):
|
||||
"""
|
||||
This is a state machine capable of building itself from a YAML config file.
|
||||
"""
|
||||
def __init__(self, config_file, jinja2_variables=None):
|
||||
"""
|
||||
:param config_file: path of the YAML file
|
||||
:param jinja2_variables: dict containing jinja2 variables
|
||||
or str with filename of YAML file to
|
||||
parse and use as dict.
|
||||
jinja2 support is disabled if this is None
|
||||
"""
|
||||
self.config = ConfigParser(config_file, jinja2_variables).config
|
||||
self.setup_states()
|
||||
super().__init__() # FSMBase.__init__() requires states
|
||||
|
Loading…
Reference in New Issue
Block a user