[Python-checkins] cpython (3.3): Minor code improvement. Review comment by Eric V. Smith

senthil.kumaran python-checkins at python.org
Mon Sep 30 03:59:35 CEST 2013


http://hg.python.org/cpython/rev/e27148c51f05
changeset:   85878:e27148c51f05
branch:      3.3
parent:      85867:b57b6ff0da12
user:        Senthil Kumaran <senthil at uthcode.com>
date:        Sun Sep 29 18:59:04 2013 -0700
summary:
  Minor code improvement. Review comment by Eric V. Smith

files:
  Lib/http/server.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/http/server.py b/Lib/http/server.py
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -781,7 +781,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.parse.unquote(path))
         words = path.split('/')
         words = filter(None, words)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list