cleaning
This commit is contained in:
parent
fe86a214de
commit
17b17d3e23
1 changed files with 6 additions and 26 deletions
|
@ -55,26 +55,6 @@ class RougailUserDataEnvironment:
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.config.property.read_write()
|
self.config.property.read_write()
|
||||||
if self.rougailconfig['environment.mandatory']:
|
|
||||||
current_titles = []
|
|
||||||
while True:
|
|
||||||
mandatories = self.config.value.mandatory()
|
|
||||||
if not mandatories:
|
|
||||||
break
|
|
||||||
mandatory = mandatories[0]
|
|
||||||
path = mandatory.path()
|
|
||||||
if '.' in path:
|
|
||||||
current_config = self.config
|
|
||||||
for idx, p in enumerate(path.split('.')[0:-1]):
|
|
||||||
current_config = current_config.option(p)
|
|
||||||
if idx < len(current_titles):
|
|
||||||
if current_titles[idx] == p:
|
|
||||||
continue
|
|
||||||
current_titles = current_titles[0:idx]
|
|
||||||
current_titles.append(p)
|
|
||||||
self.print(current_config.description(), idx)
|
|
||||||
self.display_environment(mandatory)
|
|
||||||
else:
|
|
||||||
self.parse(self.config)
|
self.parse(self.config)
|
||||||
self.config.property.read_only()
|
self.config.property.read_only()
|
||||||
# if there are unused environment variables
|
# if there are unused environment variables
|
||||||
|
|
Loading…
Reference in a new issue