Move properties from ModulePool to Action for a better hierarchy

parent fe523d2c
...@@ -27,6 +27,12 @@ import logging ...@@ -27,6 +27,12 @@ import logging
class Action(object): class Action(object):
"""This is the base class providing the common Action methods""" """This is the base class providing the common Action methods"""
def __init__(self):
self.top_module = None
self._deps_solved = False
self.env = None
def _check_all_fetched_or_quit(self): def _check_all_fetched_or_quit(self):
"""Check if every module in the pool is fetched""" """Check if every module in the pool is fetched"""
if not self.is_everything_fetched(): if not self.is_everything_fetched():
......
...@@ -35,7 +35,7 @@ from .util import path as path_mod ...@@ -35,7 +35,7 @@ from .util import path as path_mod
from . import fetch from . import fetch
from .env import Env from .env import Env
from .action import (ActionCheck, ActionCore, from .action import (Action, ActionCheck, ActionCore,
ActionTree, ActionSimulation, ActionTree, ActionSimulation,
ActionSynthesis, ActionSynthesis,
QsysHwTclUpdate) QsysHwTclUpdate)
...@@ -51,9 +51,7 @@ class ModulePool(list, ActionCheck, ActionCore, ...@@ -51,9 +51,7 @@ class ModulePool(list, ActionCheck, ActionCore,
""" """
def __init__(self, *args): def __init__(self, *args):
list.__init__(self, *args) list.__init__(self, *args)
self.top_module = None Action.__init__(self)
self._deps_solved = False
self.env = None
def set_environment(self, options): def set_environment(self, options):
"""Initialize the module pool environment from the provided options""" """Initialize the module pool environment from the provided options"""
......
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