diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 11a813e028..43ba772dbf 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -108,12 +108,12 @@ def encodeurl(decoded): if not type or not path: raise MissingParameterError("Type or path url components missing when encoding %s" % decoded) url = '%s://' % type - if user: + if user and type != "file": url += "%s" % user if pswd: url += ":%s" % pswd url += "@" - if host: + if host and type != "file": url += "%s" % host url += "%s" % path if p: