From: W. Trevor King Date: Thu, 20 Feb 2014 19:11:24 +0000 (-0800) Subject: server: Don't use a keyword for the urlstring argument to urlparse X-Git-Tag: v0.1~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c546a1d6137beddd99d5b1fc814f491be62911bd;p=package-cache.git server: Don't use a keyword for the urlstring argument to urlparse 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 --- diff --git a/package_cache/server.py b/package_cache/server.py index 4cb6597..5853f14 100644 --- a/package_cache/server.py +++ b/package_cache/server.py @@ -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):