diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 7afb2aeb73..3eb0e4d211 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -411,8 +411,6 @@ def encodeurl(decoded): | |||
411 | 411 | ||
412 | type, host, path, user, pswd, p = decoded | 412 | type, host, path, user, pswd, p = decoded |
413 | 413 | ||
414 | if not path: | ||
415 | raise MissingParameterError('path', "encoded from the data %s" % str(decoded)) | ||
416 | if not type: | 414 | if not type: |
417 | raise MissingParameterError('type', "encoded from the data %s" % str(decoded)) | 415 | raise MissingParameterError('type', "encoded from the data %s" % str(decoded)) |
418 | url = '%s://' % type | 416 | url = '%s://' % type |
@@ -423,10 +421,11 @@ def encodeurl(decoded): | |||
423 | url += "@" | 421 | url += "@" |
424 | if host and type != "file": | 422 | if host and type != "file": |
425 | url += "%s" % host | 423 | url += "%s" % host |
426 | # Standardise path to ensure comparisons work | 424 | if path: |
427 | while '//' in path: | 425 | # Standardise path to ensure comparisons work |
428 | path = path.replace("//", "/") | 426 | while '//' in path: |
429 | url += "%s" % urllib.parse.quote(path) | 427 | path = path.replace("//", "/") |
428 | url += "%s" % urllib.parse.quote(path) | ||
430 | if p: | 429 | if p: |
431 | for parm in p: | 430 | for parm in p: |
432 | url += ";%s=%s" % (parm, p[parm]) | 431 | url += ";%s=%s" % (parm, p[parm]) |