lib/python/Components/config.py: more robust code
[enigma2.git] / lib / python / Components / config.py
index 44ad6d2acceec22f91938e59cb7498326075453f..6e5608570b7d7b7410c7d010414fdfb822930301 100755 (executable)
@@ -1647,9 +1647,12 @@ class Config(ConfigSubsection):
 
                        if not base_file: # not the initial config file..
                                #update config.x.y.value when exist
-                               configEntry = eval(name)
-                               if configEntry is not None:
-                                       configEntry.value = val
+                               try:
+                                       configEntry = eval(name)
+                                       if configEntry is not None:
+                                               configEntry.value = val
+                               except (SyntaxError, KeyError):
+                                       pass
 
                # we inherit from ConfigSubsection, so ...
                #object.__setattr__(self, "saved_value", tree["config"])