diff options
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | RepSys/command.py | 8 |
2 files changed, 6 insertions, 3 deletions
@@ -11,6 +11,7 @@ - added option -F to repsys ci to set a log message file - the fix for the unreleased commits problem in the previous release was wrong, really fixed it +- fixed the use of file:/// URLs when using just the package name - don't give the wrong message "invalid command 'CMD'" when this is not the case 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 |