sort configuration variables before writing

This commit is contained in:
Josh Holtrop 2011-07-07 15:17:15 -04:00
parent 462d3161e4
commit 9c588eca01

View File

@ -28,6 +28,7 @@ def save_config(fname, conf):
old_config = ''
new_config = ''
conf_ents = filter(lambda x: not x.startswith('_'), conf)
conf_ents.sort()
for s in map(lambda x: x + ' = ' + repr(conf[x]) + '\n', conf_ents):
new_config += s
if old_config != new_config: