[Python-checkins] cpython (2.7): Code improvement. Review comment by Eric V. Smith
senthil.kumaran
python-checkins at python.org
Mon Sep 30 03:59:34 CEST 2013
http://hg.python.org/cpython/rev/dd55d54b2a15
changeset: 85877:dd55d54b2a15
branch: 2.7
parent: 85863:f24b67d044ba
user: Senthil Kumaran <senthil at uthcode.com>
date: Sun Sep 29 18:57:42 2013 -0700
summary:
Code improvement. Review comment by Eric V. Smith
files:
Lib/SimpleHTTPServer.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py
--- a/Lib/SimpleHTTPServer.py
+++ b/Lib/SimpleHTTPServer.py
@@ -150,7 +150,7 @@
path = path.split('?',1)[0]
path = path.split('#',1)[0]
# Don't forget explicit trailing slash when normalizing. Issue17324
- trailing_slash = True if path.rstrip().endswith('/') else False
+ trailing_slash = path.rstrip().endswith('/')
path = posixpath.normpath(urllib.unquote(path))
words = path.split('/')
words = filter(None, words)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list