diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-02-06 01:34:08 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-02-06 01:34:08 +0000 |
commit | 05810ef9f0e1dc761317f909146f1a201c876a64 (patch) | |
tree | d031cc326238db112a2e9a808ca130941203900e /RepSys | |
parent | ffdaa7d17062bf450a040b34056aaf0e096a9599 (diff) | |
download | mgarepo-05810ef9f0e1dc761317f909146f1a201c876a64.tar mgarepo-05810ef9f0e1dc761317f909146f1a201c876a64.tar.gz mgarepo-05810ef9f0e1dc761317f909146f1a201c876a64.tar.bz2 mgarepo-05810ef9f0e1dc761317f909146f1a201c876a64.tar.xz mgarepo-05810ef9f0e1dc761317f909146f1a201c876a64.zip |
Fixed URL normalization to make it compatible with py2.4
In py2.4 the function urlparse doesn't return a "named" tuple.
Diffstat (limited to 'RepSys')
-rw-r--r-- | RepSys/mirror.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/RepSys/mirror.py b/RepSys/mirror.py index 4fb40ce..5b114df 100644 --- a/RepSys/mirror.py +++ b/RepSys/mirror.py @@ -7,16 +7,16 @@ from RepSys.svn import SVN def _normdirurl(url): """normalize url for relocate_path needs""" parsed = urlparse.urlparse(url) - path = os.path.normpath(parsed.path) - newurl = urlparse.urlunparse((parsed.scheme, parsed.netloc, path, - parsed.params, parsed.query, parsed.fragment)) + path = os.path.normpath(parsed[2]) + newurl = urlparse.urlunparse((parsed[0], parsed[1], path, + parsed[3], parsed[4], parsed[5])) return newurl def _joinurl(url, relpath): parsed = urlparse.urlparse(url) - newpath = os.path.join(parsed.path, relpath) - newurl = urlparse.urlunparse((parsed.scheme, parsed.netloc, newpath, - parsed.params, parsed.query, parsed.fragment)) + newpath = os.path.join(parsed[2], relpath) + newurl = urlparse.urlunparse((parsed[0], parsed[1], newpath, + parsed[3], parsed[4], parsed[5])) return newurl def same_base(parent, url): |