From 5603d47e5d342697a3a44f90db259e0f8115f0a0 Mon Sep 17 00:00:00 2001 From: Zhang Qiang Date: Thu, 2 Aug 2012 15:17:18 +0800 Subject: [PATCH] don't update repo url if user and passwd are all none --- gitbuildsys/cmd_build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index 1065a71..7a85728 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -225,8 +225,9 @@ def get_repos_conf(): "has to be specified for %s" % key) splitted_list = list(splitted) - splitted_list[1] = "%s:%s@%s" % (urllib2.quote(user, safe=''), passwd, - splitted.hostname) + if user and passwd: + splitted_list[1] = "%s:%s@%s" % (urllib2.quote(user, safe=''), \ + passwd, splitted.hostname) result.append(urlunsplit(splitted_list)) -- 2.7.4