2020-10-26 18:57:43 +00:00
|
|
|
##| Copyright: (C) 2019-2020 Kevin Larke <contact AT larke DOT org>
|
|
|
|
##| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
|
2019-09-01 14:54:09 +00:00
|
|
|
import yaml,types
|
|
|
|
|
|
|
|
def parse_yaml_cfg( fn ):
|
|
|
|
"""Parse the YAML configuration file."""
|
|
|
|
|
|
|
|
cfg = None
|
|
|
|
|
|
|
|
with open(fn,"r") as f:
|
|
|
|
cfgD = yaml.load(f, Loader=yaml.FullLoader)
|
|
|
|
|
|
|
|
cfg = types.SimpleNamespace(**cfgD['p_ac'])
|
|
|
|
|
|
|
|
return cfg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|