mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Restore the relative path handling portion of #11865
This commit is contained in:
@@ -29,11 +29,11 @@ class DictDataLoader(DataLoader):
|
||||
def __init__(self, file_mapping=dict()):
|
||||
assert type(file_mapping) == dict
|
||||
|
||||
super(DictDataLoader, self).__init__()
|
||||
|
||||
self._file_mapping = file_mapping
|
||||
self._build_known_directories()
|
||||
|
||||
super(DictDataLoader, self).__init__()
|
||||
|
||||
def load_from_file(self, path):
|
||||
if path in self._file_mapping:
|
||||
return self.load(self._file_mapping[path], path)
|
||||
@@ -73,7 +73,7 @@ class DictDataLoader(DataLoader):
|
||||
rebuild_dirs = False
|
||||
if path not in self._file_mapping:
|
||||
rebuild_dirs = True
|
||||
|
||||
|
||||
self._file_mapping[path] = content
|
||||
|
||||
if rebuild_dirs:
|
||||
|
||||
Reference in New Issue
Block a user