Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
055a91aa
Commit
055a91aa
authored
Jun 09, 2017
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash if don't find the Manifest.py
parent
7dcb132c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
19 deletions
+24
-19
configparser.py
hdlmake/manifest_parser/configparser.py
+1
-1
variables.py
hdlmake/manifest_parser/variables.py
+2
-2
module.py
hdlmake/module/module.py
+21
-16
No files found.
hdlmake/manifest_parser/configparser.py
View file @
055a91aa
...
...
@@ -274,7 +274,7 @@ types:[<type 'int'>]
if
not
os
.
path
.
exists
(
config_file
):
raise
RuntimeError
(
"Config file doesn't exists: "
+
config_file
)
self
.
config_file
=
config_file
return
return
True
def
add_prefix_code
(
self
,
code
):
"""Add the arbitrary Python to be executed just before the Manifest"""
...
...
hdlmake/manifest_parser/variables.py
View file @
055a91aa
...
...
@@ -283,8 +283,8 @@ class ManifestParser(ConfigParser):
return
None
manifest
=
_search_for_manifest
(
path
)
if
manifest
is
None
:
logging
.
error
(
"No manifest found in path:
%
s"
,
path
)
quit
()
logging
.
warning
(
"No manifest found in path:
%
s"
,
path
)
return
None
else
:
logging
.
debug
(
"Parse manifest in:
%
s"
,
manifest
)
return
self
.
add_config_file
(
manifest
)
...
...
hdlmake/module/module.py
View file @
055a91aa
...
...
@@ -151,27 +151,32 @@ PARSE START: %s
manifest_parser
.
add_sufix_code
(
self
.
pool
.
options
.
sufix_code
)
manifest_parser
.
add_manifest
(
self
.
path
)
parser_tmp
=
manifest_parser
.
add_manifest
(
self
.
path
)
if
self
.
parent
is
None
:
extra_context
=
{}
if
not
parser_tmp
==
None
:
if
self
.
parent
is
None
:
extra_context
=
{}
else
:
extra_context
=
dict
(
self
.
top_module
.
manifest_dict
)
extra_context
[
"__manifest"
]
=
self
.
path
# The parse method is where the most of the parser action takes place!
opt_map
=
None
try
:
opt_map
=
manifest_parser
.
parse
(
extra_context
=
extra_context
)
except
NameError
as
name_error
:
logging
.
error
(
"Error while parsing {0}:
\n
{1}: {2}."
.
format
(
self
.
path
,
type
(
name_error
),
name_error
))
quit
()
self
.
manifest_dict
=
opt_map
else
:
extra_context
=
dict
(
self
.
top_module
.
manifest_dict
)
extra_context
[
"__manifest"
]
=
self
.
path
# The parse method is where the most of the parser action takes place!
opt_map
=
None
try
:
opt_map
=
manifest_parser
.
parse
(
extra_context
=
extra_context
)
except
NameError
as
name_error
:
logging
.
error
(
"Error while parsing {0}:
\n
{1}: {2}."
.
format
(
self
.
path
,
type
(
name_error
),
name_error
))
quit
()
self
.
manifest_dict
=
opt_map
self
.
manifest_dict
=
{}
# Process the parsed manifest_dict to assign the module properties
self
.
process_manifest
()
self
.
process_git_submodules
()
# Parse every detected submodule
for
module_aux
in
self
.
submodules
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment