diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2007-08-19 23:51:06 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2007-08-19 23:51:06 +0000 |
commit | 3b27d82fb990743378fc5cbade748d8ffda9d5ed (patch) | |
tree | 8272c271d00936aa9549e34d9179e8c9ee038147 /lib/bb/__init__.py | |
parent | 38a55340aa25265842f30475dc152e9672d9077c (diff) | |
download | bitbake-3b27d82fb990743378fc5cbade748d8ffda9d5ed.tar.gz |
__init__.py: Fix a bug in decodeurl where http://some.where.com/somefile.tgz decoded to host="" (#1530)
Diffstat (limited to 'lib/bb/__init__.py')
-rw-r--r-- | lib/bb/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py index 60f1fa754..5066a670f 100644 --- a/lib/bb/__init__.py +++ b/lib/bb/__init__.py @@ -284,10 +284,11 @@ def decodeurl(url): raise MalformedUrl(url) user = m.group('user') parm = m.group('parm') - m = re.compile('(?P<host>[^/;]+)(?P<path>/[^;]+)').match(location) - if m: - host = m.group('host') - path = m.group('path') + + locidx = location.find('/') + if locidx != -1: + host = location[:locidx] + path = location[locidx:] else: host = "" path = location |