aswi2020sebela-gitlab/python-module/Utilities/ConfigureLoader.py @ 3b598b4d
1 |
import yaml |
---|---|
2 |
|
3 |
|
4 |
def load_configuration(configure_file_name): |
5 |
|
6 |
with open(configure_file_name) as f: |
7 |
data = yaml.load(f, Loader=yaml.FullLoader) |
8 |
|
9 |
devices_dic = dict() |
10 |
|
11 |
for item in data["devices"]: |
12 |
devices_dic.update(item) |
13 |
|
14 |
data["devices"] = devices_dic |
15 |
|
16 |
return data |