fix some crashes during settings wizard
[enigma2.git] / lib / python / Components / config.py
index 6e5608570b7d7b7410c7d010414fdfb822930301..5507cae9493b23fcc5217416bda5a3404b85d186 100755 (executable)
@@ -1661,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")