summaryrefslogtreecommitdiffstats
path: root/Lib/SimpleHTTPServer.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-10-16 05:53:16 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-10-16 05:53:16 (GMT)
commit6b59f5f3fd9bdf00875a7cead15f423fa1c2f910 (patch)
tree1bd1e055f31e154230ffd962a294d37cf678c87a /Lib/SimpleHTTPServer.py
parent42b1ba31aff86af6257a0fca455d5569bce9d8fc (diff)
downloadcpython-6b59f5f3fd9bdf00875a7cead15f423fa1c2f910.zip
cpython-6b59f5f3fd9bdf00875a7cead15f423fa1c2f910.tar.gz
cpython-6b59f5f3fd9bdf00875a7cead15f423fa1c2f910.tar.bz2
Let library modules use the new keyword arguments for list.sort().
Diffstat (limited to 'Lib/SimpleHTTPServer.py')
-rw-r--r--Lib/SimpleHTTPServer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py
index f8e3fc5..d58bdc3 100644
--- a/Lib/SimpleHTTPServer.py
+++ b/Lib/SimpleHTTPServer.py
@@ -99,7 +99,7 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
except os.error:
self.send_error(404, "No permission to list directory")
return None
- list.sort(lambda a, b: cmp(a.lower(), b.lower()))
+ list.sort(key=lambda a: a.lower())
f = StringIO()
f.write("<title>Directory listing for %s</title>\n" % self.path)
f.write("<h2>Directory listing for %s</h2>\n" % self.path)