summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/urlparse.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index 69305a7..2f1965a 100644
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -157,13 +157,9 @@ def urljoin(base, url, allow_fragments = 1):
if path[:1] == '/':
return urlunparse((scheme, netloc, path,
params, query, fragment))
- if not path:
- if not params:
- params = bparams
- if not query:
- query = bquery
+ if not (path or params or query):
return urlunparse((scheme, netloc, bpath,
- params, query, fragment))
+ bparams, bquery, fragment))
segments = bpath.split('/')[:-1] + path.split('/')
# XXX The stuff below is bogus in various ways...
if segments[-1] == '.':