fix: display with subconfig
This commit is contained in:
parent
7b1262377e
commit
7488edbf80
1 changed files with 8 additions and 3 deletions
|
|
@ -38,6 +38,7 @@ class RougailOutputDisplay:
|
|||
user_data_warnings: Optional[list] = None,
|
||||
config_owner_is_path: bool = False,
|
||||
layer_datas=None,
|
||||
true_config=None,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
if rougailconfig is None:
|
||||
|
|
@ -45,6 +46,10 @@ class RougailOutputDisplay:
|
|||
rougailconfig = RougailConfig
|
||||
self.rougailconfig = rougailconfig
|
||||
self.config = config
|
||||
if true_config is None:
|
||||
self.true_config = config
|
||||
else:
|
||||
self.true_config = true_config
|
||||
self.root_config = root_config
|
||||
self.layer_datas = layer_datas
|
||||
self.config_owner_is_path = config_owner_is_path
|
||||
|
|
@ -64,11 +69,11 @@ class RougailOutputDisplay:
|
|||
def run(self) -> str:
|
||||
self.is_mandatory = self.rougailconfig["display.mandatory"]
|
||||
if self.is_mandatory:
|
||||
ori_properties = self.config.property.exportation()
|
||||
self.config.property.read_write()
|
||||
ori_properties = self.true_config.property.exportation()
|
||||
self.true_config.property.read_write()
|
||||
if not self.user_data_errors and not self.errors:
|
||||
self.mandatories()
|
||||
self.config.property.importation(ori_properties)
|
||||
self.true_config.property.importation(ori_properties)
|
||||
output_format = self.rougailconfig["display.output_format"]
|
||||
output = OutPuts().get()[output_format](self.rougailconfig)
|
||||
warnings = self.user_data_warnings + self.warnings
|
||||
|
|
|
|||
Loading…
Reference in a new issue