aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <x.fix@o2.pl>2014-09-23 13:48:00 +0200
committerGravatar Konrad Borowski <x.fix@o2.pl>2014-09-23 13:48:00 +0200
commit8d03baa4e01e13e5eb0b9c4e826d9e07020400e4 (patch)
tree37bbcf17ae2d3e33029e49494b0731694b84a8ea
parenta9b7e4582f84efb152ab00bd407305f94aa4bb2c (diff)
Make fish config work if one of colors is undefined.
This moves the sorting to be done before sorting remaining colors.
-rwxr-xr-xshare/tools/web_config/webconfig.py6
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):