ProjectController.py
changeset 1722 89824afffef2
parent 1708 24416137cda7
child 1730 64d8f52bc8c8
equal deleted inserted replaced
1721:42f64435d740 1722:89824afffef2
   897 
   897 
   898                 # first section contains programs
   898                 # first section contains programs
   899                 for line in ListGroup[0]:
   899                 for line in ListGroup[0]:
   900                     # Split and Maps each field to dictionnary entries
   900                     # Split and Maps each field to dictionnary entries
   901                     attrs = dict(zip(ProgramsListAttributeName,line.strip().split(';')))
   901                     attrs = dict(zip(ProgramsListAttributeName,line.strip().split(';')))
   902                     # Truncate "C_path" to remove conf an ressources names
   902                     # Truncate "C_path" to remove conf an resources names
   903                     attrs["C_path"] = '__'.join(attrs["C_path"].split(".",2)[1:])
   903                     attrs["C_path"] = '__'.join(attrs["C_path"].split(".",2)[1:])
   904                     # Push this dictionnary into result.
   904                     # Push this dictionnary into result.
   905                     self._ProgramList.append(attrs)
   905                     self._ProgramList.append(attrs)
   906 
   906 
   907                 # second section contains all variables
   907                 # second section contains all variables
   908                 config_FBs = {}
   908                 config_FBs = {}
   909                 Idx = 0
   909                 Idx = 0
   910                 for line in ListGroup[1]:
   910                 for line in ListGroup[1]:
   911                     # Split and Maps each field to dictionnary entries
   911                     # Split and Maps each field to dictionnary entries
   912                     attrs = dict(zip(VariablesListAttributeName,line.strip().split(';')))
   912                     attrs = dict(zip(VariablesListAttributeName,line.strip().split(';')))
   913                     # Truncate "C_path" to remove conf an ressources names
   913                     # Truncate "C_path" to remove conf an resources names
   914                     parts = attrs["C_path"].split(".",2)
   914                     parts = attrs["C_path"].split(".",2)
   915                     if len(parts) > 2:
   915                     if len(parts) > 2:
   916                         config_FB = config_FBs.get(tuple(parts[:2]))
   916                         config_FB = config_FBs.get(tuple(parts[:2]))
   917                         if config_FB:
   917                         if config_FB:
   918                             parts = [config_FB] + parts[2:]
   918                             parts = [config_FB] + parts[2:]