added skip comment
authorRonny Strutz <ronny.strutz@multimedia-labs.de>
Thu, 1 Sep 2005 23:16:37 +0000 (23:16 +0000)
committerRonny Strutz <ronny.strutz@multimedia-labs.de>
Thu, 1 Sep 2005 23:16:37 +0000 (23:16 +0000)
removed some old stuff

lib/python/Components/config.py

index 7419eff54f2177319a37e70f88b8d73ed3ab8e0c..ed85ed220ec5637ed42a6fe29dafed3ba5078ac0 100644 (file)
@@ -12,6 +12,10 @@ class configFile:
                        line = self.file.readline()
                        if line == "":
                                break
                        line = self.file.readline()
                        if line == "":
                                break
+                       
+                       if line.startswith("#"):                #skip comments
+                               continue        
+                               
                        self.addElement(line)
                self.file.close()
 
                        self.addElement(line)
                self.file.close()
 
@@ -38,10 +42,6 @@ class configFile:
                        
                        if wstr[len(wstr) - 1] != '\n':
                                wstr = wstr + "\n"
                        
                        if wstr[len(wstr) - 1] != '\n':
                                wstr = wstr + "\n"
-                       
-                       #       fileHandle.write(wstr)
-                       #else:
-                       #       fileHandle.write(wstr + "\n")
 
                        fileHandle.write(wstr)
 
 
                        fileHandle.write(wstr)
 
@@ -155,7 +155,6 @@ class configElement:
                        self.save()             #add missing value to dict
                else:
                        self.value = value
                        self.save()             #add missing value to dict
                else:
                        self.value = value
-                       print "value ok"
 
        def __init__(self, configPath, control, defaultValue, vals):
                self.configPath = configPath
 
        def __init__(self, configPath, control, defaultValue, vals):
                self.configPath = configPath