mirror of
https://github.com/gryf/wicd.git
synced 2026-01-05 05:14:17 +01:00
Make configfile sorted
This commit is contained in:
@@ -154,7 +154,7 @@ class ConfigManager(RawConfigParser):
|
|||||||
configfile = open(self.config_file, 'w')
|
configfile = open(self.config_file, 'w')
|
||||||
RawConfigParser.write(self, configfile)
|
RawConfigParser.write(self, configfile)
|
||||||
configfile.close()
|
configfile.close()
|
||||||
|
|
||||||
def remove_section(self, section):
|
def remove_section(self, section):
|
||||||
""" Wrapper around the ConfigParser.remove_section() method.
|
""" Wrapper around the ConfigParser.remove_section() method.
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ class ConfigManager(RawConfigParser):
|
|||||||
def write(self):
|
def write(self):
|
||||||
""" Writes the loaded config file to disk. """
|
""" Writes the loaded config file to disk. """
|
||||||
in_this_file = []
|
in_this_file = []
|
||||||
for sname in self.sections():
|
for sname in sorted(self.sections()):
|
||||||
fname = self.get_option(sname, '_filename_')
|
fname = self.get_option(sname, '_filename_')
|
||||||
if fname and fname != self.config_file:
|
if fname and fname != self.config_file:
|
||||||
# Write sections from other files
|
# Write sections from other files
|
||||||
|
|||||||
Reference in New Issue
Block a user