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
1ca9d077
Commit
1ca9d077
authored
Jul 16, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Action class uses redundant arguments: options and env are already embedded into modules_pool
parent
a1e17cb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
__main__.py
hdlmake/__main__.py
+6
-7
action.py
hdlmake/action/action.py
+3
-3
No files found.
hdlmake/__main__.py
View file @
1ca9d077
...
...
@@ -91,10 +91,10 @@ def main():
sys
.
exit
(
"Exiting"
)
_action_runner
(
options
,
modules_pool
,
env
)
_action_runner
(
modules_pool
)
def
_action_runner
(
options
,
modules_pool
,
env
):
def
_action_runner
(
modules_pool
):
from
.action
import
(
CheckCondition
,
CleanModules
,
FetchModules
,
ListFiles
,
ListModules
,
MergeCores
,
Tree
,
GenerateSimulationMakefile
,
...
...
@@ -106,12 +106,13 @@ def _action_runner(options, modules_pool, env):
# DECODE THE COMMANDS/ACTIONS HERE #
# #
top_mod
=
modules_pool
.
get_top_module
()
options
=
modules_pool
.
env
.
options
if
options
.
command
==
"check-env"
:
env
.
check_env
(
verbose
=
True
)
modules_pool
.
env
.
check_env
(
verbose
=
True
)
quit
()
elif
options
.
command
==
"check-manifest"
:
env
.
check_manifest
(
top_mod
.
manifest
,
verbose
=
True
)
modules_pool
.
env
.
check_manifest
(
top_mod
.
manifest
,
verbose
=
True
)
quit
()
elif
options
.
command
==
"manifest-help"
:
ManifestParser
()
.
print_help
()
...
...
@@ -174,9 +175,7 @@ def _action_runner(options, modules_pool, env):
# #
try
:
for
command
in
action
:
action_instance
=
command
(
modules_pool
=
modules_pool
,
options
=
options
,
env
=
env
)
action_instance
=
command
(
modules_pool
=
modules_pool
)
action_instance
.
run
()
except
Exception
as
e
:
import
traceback
...
...
hdlmake/action/action.py
View file @
1ca9d077
...
...
@@ -24,10 +24,10 @@ import logging
class
Action
(
object
):
def
__init__
(
self
,
modules_pool
,
options
,
env
):
def
__init__
(
self
,
modules_pool
):
self
.
modules_pool
=
modules_pool
self
.
options
=
options
self
.
env
=
env
self
.
options
=
modules_pool
.
env
.
options
self
.
env
=
modules_pool
.
env
self
.
_check_manifest
()
self
.
_check_env
()
...
...
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