mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 23:47:25 +00:00
Make fish config work if one of colors is undefined.
This moves the sorting to be done before sorting remaining colors.
This commit is contained in:
parent
a9b7e4582f
commit
8d03baa4e0
1 changed files with 3 additions and 3 deletions
|
@ -483,15 +483,15 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||||
result.append(data)
|
result.append(data)
|
||||||
remaining.discard(color_name)
|
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
|
# 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
|
# user deletes one he can still set it again via the web interface
|
||||||
for color_name in remaining:
|
for color_name in remaining:
|
||||||
color_desc = descriptions.get(color_name, '')
|
color_desc = descriptions.get(color_name, '')
|
||||||
result.append([color_name, color_desc, parse_color('')])
|
result.append([color_name, color_desc, parse_color('')])
|
||||||
|
|
||||||
# Sort our result (by their keys)
|
|
||||||
result.sort(key=operator.itemgetter('name'))
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def do_get_functions(self):
|
def do_get_functions(self):
|
||||||
|
|
Loading…
Reference in a new issue