From 06c5b7cd84be09955c6a41fb2c3b9bda335d08b6 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Mon, 1 Jul 2013 11:11:20 +0800 Subject: [PATCH] Config is ordered alphabetically --- lib/commands/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/commands/config.py b/lib/commands/config.py index d165681..4de8e3c 100644 --- a/lib/commands/config.py +++ b/lib/commands/config.py @@ -93,7 +93,8 @@ class ConfigCommand(Command): def run(self, args): if args.action == 'list': def show_list(settings, ident): - for name, setting in settings.items(): + for name in sorted(settings.keys()): + setting = settings[name] if type(setting) != dict: print u'{0:<20}: {1}'.format(u' ' * ident + name, setting) else: @@ -103,7 +104,8 @@ class ConfigCommand(Command): elif args.action == 'flatlist': def show_list(settings, parent=''): - for name, setting in settings.items(): + for name in sorted(settings.keys()): + setting = settings[name] if type(setting) != dict: print u'%s: %s' % (parent + name, setting) else: -- 2.11.0