diff options
Diffstat (limited to 'Lib/urllib/parse.py')
-rw-r--r-- | Lib/urllib/parse.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py index cfd47f9..e8e9cc7 100644 --- a/Lib/urllib/parse.py +++ b/Lib/urllib/parse.py @@ -249,14 +249,9 @@ def urljoin(base, url, allow_fragments=True): if path[:1] == '/': return urlunparse((scheme, netloc, path, params, query, fragment)) - if not path: + if not path and not params: path = bpath - if not params: - params = bparams - else: - path = path[:-1] - return urlunparse((scheme, netloc, path, - params, query, fragment)) + params = bparams if not query: query = bquery return urlunparse((scheme, netloc, path, |