1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

bitbake: fetch2.URI: Set username/password should not change the other

When setting the username after already having set the password, the password
was unexpectedly reset. This change fixes this issue and introduces unit tests
to make sure it doesn't happen again.

(Bitbake rev: 25faef3a047f9c7564089463d7c96f6910b640cb)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Olof Johansson
2014-01-20 12:03:24 +01:00
committed by Richard Purdie
parent 57484d68df
commit 7dd4bf6310
2 changed files with 17 additions and 2 deletions
+3 -2
View File
@@ -321,9 +321,10 @@ class URI(object):
@username.setter
def username(self, username):
password = self.password
self.userinfo = username
if self.password:
self.userinfo += ":%s" % self.password
if password:
self.userinfo += ":%s" % password
@property
def password(self):