configurationengine/source/plugins/symbian/ConeGenconfmlPlugin/genconfmlplugin/confflattener.py
changeset 3 e7e0ae78773e
parent 0 2e8eeb919028
child 4 0951727b8815
equal deleted inserted replaced
2:87cfa131b535 3:e7e0ae78773e
    80                 
    80                 
    81         """ Copy all data values from the existing configuration to the new configuration """
    81         """ Copy all data values from the existing configuration to the new configuration """
    82         toview = to_config.get_default_view()
    82         toview = to_config.get_default_view()
    83         for fea in toview.get_features('**'):
    83         for fea in toview.get_features('**'):
    84             fromfea = dview_from.get_feature(fea.fqr)
    84             fromfea = dview_from.get_feature(fea.fqr)
    85             if fromfea.get_value() != None:
    85             # If the value is an empty list, don't add it.
    86                 fea.set_value(fromfea.get_value())
    86             # This is because an empty list means that we have
       
    87             # a sequence setting or sequence sub-setting that doesn't have
       
    88             # any contents, and calling set_value() would create a data
       
    89             # element for it with the attribute empty="true".
       
    90             val = fromfea.get_value()
       
    91             if val not in (None, []):
       
    92                 fea.set_value(val)
    87         return to_config
    93         return to_config
    88 
    94 
    89     def create_configuration(self, conf_from_org, settings, path="tempfile.confml"):
    95     def create_configuration(self, conf_from_org, settings, path="tempfile.confml"):
    90         """
    96         """
    91         Flats configuration to one feature and data confml
    97         Flats configuration to one feature and data confml