Skip to content
Snippets Groups Projects
Commit ed031314 authored by Hannes Feldt's avatar Hannes Feldt
Browse files

fix

parent 760bf337
No related branches found
No related tags found
No related merge requests found
Pipeline #94962 failed
...@@ -3,6 +3,7 @@ import struct ...@@ -3,6 +3,7 @@ import struct
import time import time
import logging import logging
import sys import sys
import pathlib
if sys.version_info < (3,9): if sys.version_info < (3,9):
import importlib_resources import importlib_resources
else: else:
...@@ -32,7 +33,7 @@ class yamlconfig(): ...@@ -32,7 +33,7 @@ class yamlconfig():
if yamlfile.split('.')[-1]=='yaml': if yamlfile.split('.')[-1]=='yaml':
self.conf=yaml.load(open(yamlfile), Loader=yaml.FullLoader) self.conf=yaml.load(open(yamlfile), Loader=yaml.FullLoader)
else: else:
pkg_data_file = "/etc/hwtr/" + (yamlfile+'.yaml') pkg_data_file = pathlib.PurePath("etc", "hwtr", (yamlfile+'.yaml'))
self.conf=yaml.load(pkg_data_file.open(), Loader=yaml.FullLoader) self.conf=yaml.load(pkg_data_file.open(), Loader=yaml.FullLoader)
self.expand_variables() self.expand_variables()
# print([[v['name'],v.get('devreg')] for v in var1]) # print([[v['name'],v.get('devreg')] for v in var1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment