From fa1bd89f60106fc7945308d9dd1d4ea3d8416a3b Mon Sep 17 00:00:00 2001 From: David Paleino Date: Mon, 21 Nov 2011 10:56:30 +0100 Subject: [PATCH] Make configfile sorted --- wicd/configmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wicd/configmanager.py b/wicd/configmanager.py index 70ca5d8..52fc0ca 100644 --- a/wicd/configmanager.py +++ b/wicd/configmanager.py @@ -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