1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-24 23:22:27 +01:00

Make configfile sorted

This commit is contained in:
David Paleino
2011-11-21 10:56:30 +01:00
parent a34aa9fa25
commit fa1bd89f60

View File

@@ -154,7 +154,7 @@ class ConfigManager(RawConfigParser):
configfile = open(self.config_file, 'w')
RawConfigParser.write(self, configfile)
configfile.close()
def remove_section(self, section):
""" Wrapper around the ConfigParser.remove_section() method.
@@ -210,7 +210,7 @@ class ConfigManager(RawConfigParser):
def write(self):
""" Writes the loaded config file to disk. """
in_this_file = []
for sname in self.sections():
for sname in sorted(self.sections()):
fname = self.get_option(sname, '_filename_')
if fname and fname != self.config_file:
# Write sections from other files