server: Don't use a keyword for the urlstring argument to urlparse
authorW. Trevor King <wking@tremily.us>
Thu, 20 Feb 2014 19:11:24 +0000 (11:11 -0800)
committerW. Trevor King <wking@tremily.us>
Thu, 20 Feb 2014 19:23:43 +0000 (11:23 -0800)
Despite being documented as urlstring [1], using a keyword argument
raises a TypeError:

  TypeError: urlparse() got an unexpected keyword argument 'urlstring'

[1]: http://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse

package_cache/server.py

index 4cb6597e19eee05d4023040da3a69b0bb3a59621..5853f14b9f899b046a830837b4a05a6f0918b71a 100644 (file)
@@ -31,7 +31,7 @@ class Server (object):
         url = environ.get('PATH_INFO', None)
         if url is None:
             raise InvalidFile(url=url)
-        parsed_url = _urllib_parse.urlparse(urlstring=url)
+        parsed_url = _urllib_parse.urlparse(url)
         relative_path = parsed_url.path.lstrip('/').replace('/', _os.path.sep)
         cache_path = _os.path.join(self.cache, relative_path)
         if not _os.path.exists(path=cache_path):