From adabc2d7a079739ef7bb9b9eb0e26f353378405a Mon Sep 17 00:00:00 2001 From: David Xia Date: Tue, 22 Jul 2014 23:50:24 -0400 Subject: [PATCH] Fix fish_config error with python3 Closes #1253. --- share/tools/web_config/webconfig.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 9896e7ce0..0e4a6028f 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -1,7 +1,9 @@ #!/usr/bin/env python # Whether we're Python 2 -import sys, os +import sys +import os +import operator IS_PY2 = sys.version_info[0] == 2 if IS_PY2: @@ -487,7 +489,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): result.append([color_name, color_desc, parse_color('')]) # Sort our result (by their keys) - result.sort() + result.sort(key=operator.itemgetter('name')) return result