]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Minor code improvement. Review comment by Eric V. Smith
authorSenthil Kumaran <senthil@uthcode.com>
Mon, 30 Sep 2013 01:59:04 +0000 (18:59 -0700)
committerSenthil Kumaran <senthil@uthcode.com>
Mon, 30 Sep 2013 01:59:04 +0000 (18:59 -0700)
Lib/http/server.py

index 195f9ee36b1463fae15347980472c8ea6a8e0042..ebc2a8fcdc2fa72ca6e1d082df969cb1f3f8a9d3 100644 (file)
@@ -781,7 +781,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
         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)