mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 21:53:09 +08: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
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user