Commit 9e378856 authored by Tristan Gingold's avatar Tristan Gingold

reformating and cleanup.

parent ea5484da
......@@ -233,7 +233,6 @@ types:[<type 'int'>]
def add_config_file(self, config_file):
"""Add the Manifest to be processed by the parser"""
self.config_file = config_file
return True
def add_prefix_code(self, code):
"""Add the arbitrary Python to be executed just before the Manifest"""
......
......@@ -290,9 +290,8 @@ class ManifestParser(ConfigParser):
manifest = _search_for_manifest(path)
if manifest is None:
raise Exception("No manifest found in path: {}".format(path))
else:
logging.debug("Parse manifest in: %s", manifest)
return self.add_config_file(manifest)
self.add_config_file(manifest)
def print_help(self):
"""Print the help for the Manifest parser object"""
......
......@@ -72,8 +72,7 @@ class Module(ModuleContent):
def remove_dir_from_disk(self):
"""Delete the module dir if it is already fetched and available"""
if not self.isfetched:
return
assert self.isfetched
logging.debug("Removing " + self.path)
command_tmp = shell.rmdir_command() + " " + self.path
shell.run(command_tmp)
......@@ -106,8 +105,7 @@ class Module(ModuleContent):
if self.manifest_dict or self.isfetched is False:
return
if self.path is None:
raise RuntimeError()
assert self.path is not None
logging.debug("""
***********************************************************
......@@ -119,10 +117,10 @@ PARSE START: %s
manifest_parser.add_prefix_code(self.pool.options.prefix_code)
manifest_parser.add_suffix_code(self.pool.options.suffix_code)
parser_tmp = manifest_parser.add_manifest(self.path)
if not parser_tmp == None:
# Look for the Manifest.py file
manifest_parser.add_manifest(self.path)
# Parse and extract variables from it.
if self.parent is None:
extra_context = {}
else:
......@@ -138,14 +136,12 @@ PARSE START: %s
"Error while parsing {0}:\n{1}: {2}.".format(
self.path, type(name_error), name_error))
self.manifest_dict = opt_map
else:
self.manifest_dict = {}
# Process the parsed manifest_dict to assign the module properties
self.process_manifest()
self.process_git_submodules()
# Parse every detected submodule
# Recurse: parse every detected submodule
for module_aux in self.submodules():
module_aux.parse_manifest()
......
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