Fix including from sub dir (#18378)

The include path is now always relative to the root of the config dir.
This commit is contained in:
Bram Kragten 2018-11-11 17:15:58 +01:00 committed by Paulus Schoutsen
parent 9c92151ad1
commit b8c06ad019

View file

@ -80,7 +80,8 @@ def load_yaml(fname: str, round_trip: bool = False) -> JSON_TYPE:
yaml = YAML(typ='rt')
yaml.preserve_quotes = True
else:
ExtSafeConstructor.name = fname
if not hasattr(ExtSafeConstructor, 'name'):
ExtSafeConstructor.name = fname
yaml = YAML(typ='safe')
yaml.Constructor = ExtSafeConstructor