diff options
author | Konrad Borowski <x.fix@o2.pl> | 2014-09-23 13:48:00 +0200 |
---|---|---|
committer | Konrad Borowski <x.fix@o2.pl> | 2014-09-23 13:48:00 +0200 |
commit | 8d03baa4e01e13e5eb0b9c4e826d9e07020400e4 (patch) | |
tree | 37bbcf17ae2d3e33029e49494b0731694b84a8ea /share | |
parent | a9b7e4582f84efb152ab00bd407305f94aa4bb2c (diff) |
Make fish config work if one of colors is undefined.
This moves the sorting to be done before sorting remaining colors.
Diffstat (limited to 'share')
-rwxr-xr-x | share/tools/web_config/webconfig.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 47a9fb4e..bfdd20d9 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -483,15 +483,15 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): result.append(data) remaining.discard(color_name) + # Sort our result (by their keys) + result.sort(key=operator.itemgetter('name')) + # Ensure that we have all the color names we know about, so that if the # user deletes one he can still set it again via the web interface for color_name in remaining: color_desc = descriptions.get(color_name, '') result.append([color_name, color_desc, parse_color('')]) - # Sort our result (by their keys) - result.sort(key=operator.itemgetter('name')) - return result def do_get_functions(self): |