aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2008-02-05 20:47:58 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2008-02-05 20:47:58 +0000
commit2295fcbbaa57f13a838a2f18714b17d0b755cb2f (patch)
treea6a8ec25df1681d04572391118000d37f4df9d98 /RepSys
parent007212afccceca682e0f98f2871398a3ff35db03 (diff)
downloadmgarepo-2295fcbbaa57f13a838a2f18714b17d0b755cb2f.tar
mgarepo-2295fcbbaa57f13a838a2f18714b17d0b755cb2f.tar.gz
mgarepo-2295fcbbaa57f13a838a2f18714b17d0b755cb2f.tar.bz2
mgarepo-2295fcbbaa57f13a838a2f18714b17d0b755cb2f.tar.xz
mgarepo-2295fcbbaa57f13a838a2f18714b17d0b755cb2f.zip
Fixed the use of file:/// URLs when using just the package name
Diffstat (limited to 'RepSys')
-rw-r--r--RepSys/command.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/RepSys/command.py b/RepSys/command.py
index 8029e08..1833bcd 100644
--- a/RepSys/command.py
+++ b/RepSys/command.py
@@ -1,6 +1,7 @@
#!/usr/bin/python
from RepSys import Error, config
-import sys, os, urllib
+import sys, os
+import urlparse
import optparse
__all__ = ["OptionParser", "do_command", "default_parent"]
@@ -46,8 +47,9 @@ def default_parent(url):
if not default_parent:
raise Error, "received a relative url, " \
"but default_parent was not setup"
- type, rest = urllib.splittype(default_parent)
- url = type+':'+os.path.normpath(rest+'/'+url)
+ parsed = list(urlparse.urlparse(default_parent))
+ parsed[2] = os.path.normpath(parsed[2] + "/" + url)
+ url = urlparse.urlunparse(parsed)
return url
# vim:et:ts=4:sw=4