Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 41DC6E00E47; Tue, 23 Aug 2016 03:07:54 -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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [217.89.139.141 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Greylist: delayed 590 seconds by postgrey-1.32 at yocto-www; Tue, 23 Aug 2016 03:07:51 PDT Received: from smtp1.vector.com (smtp1.vector.com [217.89.139.141]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id BFFB8E00D19 for ; Tue, 23 Aug 2016 03:07:51 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.vector.com (Postfix) with ESMTP id 283573C9C1 for ; Tue, 23 Aug 2016 11:58:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at vector.com Received: from smtp1.vector.com ([127.0.0.1]) by localhost (smtp1.vector.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1k_tzyalrJfJ for ; Tue, 23 Aug 2016 11:57:58 +0200 (CEST) Received: from vistrex5.vi.vector.int (unknown [10.49.3.65]) by smtp1.vector.com (Postfix) with ESMTPS for ; Tue, 23 Aug 2016 11:57:58 +0200 (CEST) Received: from xubuntu-14.04-lts (10.49.80.104) by vistrex5.vi.vector.int (10.49.3.61) with Microsoft SMTP Server id 14.3.279.2; Tue, 23 Aug 2016 11:57:57 +0200 From: Alexander Egorenkov To: Date: Tue, 23 Aug 2016 11:57:50 +0200 Message-ID: <20160823095750.41216-1-Alexander.Egorenkov@vector.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: 8959ae4b-c457-4990-be14-918c767bdf10 X-G-Data-MailSecurity-for-Exchange-Guid: A55DA895-CF69-4126-BAA7-CF2ACC6D2637 X-Mailman-Approved-At: Tue, 23 Aug 2016 03:21:40 -0700 Cc: Alexander Egorenkov Subject: [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:07:54 -0000 Content-Type: text/plain 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 = t.spli(":") ValueError: too many values to unpack. [YOCTO #10170] 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 = Project.objects.get(id = pid) + max_split=1 # add conf variables if 'configvarAdd' in request.POST: t=request.POST['configvarAdd'].strip() if ":" in t: - variable, value = t.split(":") + variable, value = t.split(":", max_split) else: variable = t value = "" @@ -2178,7 +2179,7 @@ if True: if 'configvarChange' in request.POST: t=request.POST['configvarChange'].strip() if ":" in t: - variable, value = t.split(":") + variable, value = t.split(":", max_split) else: variable = t value = "" -- 2.9.3