don't update repo url if user and passwd are all none
authorZhang Qiang <qiang.z.zhang@intel.com>
Thu, 2 Aug 2012 07:17:18 +0000 (15:17 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Thu, 2 Aug 2012 07:17:18 +0000 (15:17 +0800)
gitbuildsys/cmd_build.py

index 1065a71..7a85728 100644 (file)
@@ -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))