git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote branch 'origin/pootle-import'
[enigma2.git]
/
lib
/
python
/
Components
/
config.py
diff --git
a/lib/python/Components/config.py
b/lib/python/Components/config.py
index 44ad6d2acceec22f91938e59cb7498326075453f..5507cae9493b23fcc5217416bda5a3404b85d186 100755
(executable)
--- a/
lib/python/Components/config.py
+++ b/
lib/python/Components/config.py
@@
-1647,9
+1647,12
@@
class Config(ConfigSubsection):
if not base_file: # not the initial config file..
#update config.x.y.value when exist
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"])
# we inherit from ConfigSubsection, so ...
#object.__setattr__(self, "saved_value", tree["config"])
@@
-1658,9
+1661,12
@@
class Config(ConfigSubsection):
def saveToFile(self, filename):
text = self.pickle()
def saveToFile(self, filename):
text = self.pickle()
- f = open(filename, "w")
- f.write(text)
- f.close()
+ try:
+ f = open(filename, "w")
+ f.write(text)
+ f.close()
+ except IOError:
+ print "Config: Couldn't write %s" % filename
def loadFromFile(self, filename, base_file=False):
f = open(filename, "r")
def loadFromFile(self, filename, base_file=False):
f = open(filename, "r")