Commit dbb5f091 authored by Tristan Gingold's avatar Tristan Gingold

main.py: add comment, move code.

parent b8a5a118
......@@ -47,6 +47,13 @@ class Action(object):
self._deps_solved = False
self.options = options
def __contains(self, module):
"""Check if the pool contains the given module by checking the URL"""
for mod in self.manifests:
if mod.url == module.url:
return True
return False
def _add(self, new_module):
"""Add the given new module if this is not already in the pool"""
assert isinstance(new_module, Module), "Expect a Module instance"
......@@ -177,13 +184,6 @@ class Action(object):
config_dict = manifest_dict_tmp
return config_dict
def __contains(self, module):
"""Check if the pool contains the given module by checking the URL"""
for mod in self.manifests:
if mod.url == module.url:
return True
return False
def __str__(self):
"""Cast the module list as a list of strings"""
return str([str(m) for m in self.manifests])
......@@ -56,7 +56,12 @@ def hdlmake(args):
# Create a ModulePool object, this will become our workspace
action = Commands(options)
# Load all manifests, starting from the top-one (the one in the
# current directory)
action.load_all_manifests()
# Extract tool and top entity.
action.setup()
# Execute the appropriated action for the freshly created modules pool
......
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