refactor fetchto calculation in module content

parent 8599c897
...@@ -49,16 +49,20 @@ class ModuleContent(ModuleCore): ...@@ -49,16 +49,20 @@ class ModuleContent(ModuleCore):
paths = self._make_list_of_paths(self.manifest_dict["files"]) paths = self._make_list_of_paths(self.manifest_dict["files"])
self.files = self._create_file_list_from_paths(paths=paths) self.files = self._create_file_list_from_paths(paths=paths)
def _process_manifest_modules(self): def _get_fetchto(self):
"""Process the submodules required by the HDLMake module""" """Calculate the fetchto folder"""
if ("fetchto" in self.manifest_dict and if ("fetchto" in self.manifest_dict and
self.manifest_dict["fetchto"] is not None): self.manifest_dict["fetchto"] is not None):
fetchto = path_mod.rel2abs(self.manifest_dict["fetchto"], fetchto = path_mod.rel2abs(self.manifest_dict["fetchto"],
self.path) self.path)
else: else:
fetchto = self.fetchto() fetchto = self.fetchto()
return fetchto
def _process_manifest_modules(self):
"""Process the submodules required by the HDLMake module"""
# Process required modules # Process required modules
fetchto = self._get_fetchto()
if "modules" in self.manifest_dict: if "modules" in self.manifest_dict:
if "local" in self.manifest_dict["modules"]: if "local" in self.manifest_dict["modules"]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment