Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 3D129E00E4B; Tue, 23 Aug 2016 03:54:31 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.24 listed in list.dnswl.org] Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D3D49E00D1E for ; Tue, 23 Aug 2016 03:54:28 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP; 23 Aug 2016 03:54:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,565,1464678000"; d="scan'208";a="851585" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga005.jf.intel.com with ESMTP; 23 Aug 2016 03:54:25 -0700 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.113]) by IRSMSX106.ger.corp.intel.com ([169.254.8.240]) with mapi id 14.03.0248.002; Tue, 23 Aug 2016 11:54:21 +0100 From: "Barros Pena, Belen" To: Alexander Egorenkov , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [PATCH] toaster: Fix adding of bitbake variables containing ':' Thread-Index: AQHR/SyzJL1VW770nUW3VSUaeD6Neg== Date: Tue, 23 Aug 2016 10:54:21 +0000 Message-ID: References: <20160823095750.41216-1-Alexander.Egorenkov@vector.com> In-Reply-To: <20160823095750.41216-1-Alexander.Egorenkov@vector.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.6.6.160626 x-originating-ip: [10.103.238.154] MIME-Version: 1.0 Subject: Re: [PATCH] toaster: Fix adding of bitbake variables containing ':' X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 10:54:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <7E161C05BE23A341BBE0B9D37129B15B@intel.com> Content-Transfer-Encoding: quoted-printable On 23/08/2016 10:57, "toaster-bounces@yoctoproject.org on behalf of Alexander Egorenkov" wrote: >This fix is a backport from toaster-next. > >Krogoth Toaster is unable to add a variable containing ':' >and fails with the following error message: > >error on request: >too many values to unpack >Traceback (most recent call last): > File "bitbake/lib/toaster/toastergui/views.py", line 2171, in >xhr_configvaredit > variable, value =3D t.spli(":") >ValueError: too many values to unpack. > >[YOCTO #10170] This works for me. Thanks! Bel=E9n > >Signed-off-by: Alexander Egorenkov >--- > bitbake/lib/toaster/toastergui/views.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/bitbake/lib/toaster/toastergui/views.py >b/bitbake/lib/toaster/toastergui/views.py >index bd5bf63..2b714dc 100755 >--- a/bitbake/lib/toaster/toastergui/views.py >+++ b/bitbake/lib/toaster/toastergui/views.py >@@ -2164,11 +2164,12 @@ if True: > def xhr_configvaredit(request, pid): > try: > prj =3D Project.objects.get(id =3D pid) >+ max_split=3D1 > # add conf variables > if 'configvarAdd' in request.POST: > t=3Drequest.POST['configvarAdd'].strip() > if ":" in t: >- variable, value =3D t.split(":") >+ variable, value =3D t.split(":", max_split) > else: > variable =3D t > value =3D "" >@@ -2178,7 +2179,7 @@ if True: > if 'configvarChange' in request.POST: > t=3Drequest.POST['configvarChange'].strip() > if ":" in t: >- variable, value =3D t.split(":") >+ variable, value =3D t.split(":", max_split) > else: > variable =3D t > value =3D "" >--=20 >2.9.3 > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster