Skip to content
Snippets Groups Projects
Commit 51f1d3e7 authored by eric pellegrini's avatar eric pellegrini
Browse files

Refactored the code such that the info about the configurators is

updated when setting up the configuration
parent 68b8af79
No related branches found
No related tags found
No related merge requests found
......@@ -65,10 +65,10 @@ class Configurable(object):
self._configured=False
if settings is not None:
self.settings = settings
self._info = ""
self.build_configuration()
if settings is not None:
self.set_settings(settings)
def build_configuration(self):
......@@ -154,6 +154,8 @@ class Configurable(object):
conf.configure(self,parameters[name])
self._configuration[name]=conf
self._info += conf.get_information()
configured.add(name)
......@@ -172,15 +174,10 @@ class Configurable(object):
:rtype: str
'''
if not self._configured:
return "Not yet configured"
info = []
for configurator in self._configuration.values():
info.append(configurator.get_information())
info.append('\n')
return "".join(info)
if not self._info:
return "No information available yet."
return self._info
@classmethod
def build_doc(cls):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment