diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-01 13:08:55 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-01 13:08:55 +0000 |
commit | 71aa6dc4b72374aa84b4c1bb4067a2b7841e4322 (patch) | |
tree | 25ac7867efd4706108cb683111753529163eeeb3 /morphlib/morphology.py | |
parent | 6136d3edd1129f5f6b517d83eb74866459b9c22f (diff) | |
download | morph-71aa6dc4b72374aa84b4c1bb4067a2b7841e4322.tar.gz |
make --git-base-url add a slash to the end, if missing
Diffstat (limited to 'morphlib/morphology.py')
-rw-r--r-- | morphlib/morphology.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/morphlib/morphology.py b/morphlib/morphology.py index 4fe6344a..e8af7747 100644 --- a/morphlib/morphology.py +++ b/morphlib/morphology.py @@ -34,9 +34,9 @@ class Morphology(object): if self.kind == 'stratum': for source in self.sources: if 'repo' not in source: - source['repo'] = source['name'] + source[u'repo'] = source['name'] repo = self._join_with_baseurl(source['repo']) - source['repo'] = unicode(repo) + source[u'repo'] = unicode(repo) self.filename = self._fp.name @@ -105,7 +105,10 @@ class Morphology(object): if is_relative: if not url.endswith('/'): url += '/' - return self._baseurl + url + baseurl = self._baseurl + if baseurl and not baseurl.endswith('/'): + baseurl += '/' + return baseurl + url else: return url |