Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD6D6C433EF for ; Thu, 7 Jul 2022 19:22:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7DF8184573; Thu, 7 Jul 2022 21:22:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="WQVkScNT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7FACA84572; Thu, 7 Jul 2022 21:22:23 +0200 (CEST) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BB78584573 for ; Thu, 7 Jul 2022 21:22:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72f.google.com with SMTP id o26so7054365qkl.6 for ; Thu, 07 Jul 2022 12:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ytPINBkv5rvVprEGvB/DMT2PhcEpAXk9N65SfuVNYSU=; b=WQVkScNTSDL3DmSGTbam8Wjh8LdAGRsUUTjFNsvPosvdOeAOlTcCLZHtVAdWJuVjoz bQdecnmImo7Ith4euvB9epcRpkrGOCLSc5WkEIcc1zO5wDIHjAtjuqowAhgdH9bh2dtm HDe0fymKX1zkIx+LmUZa7ZdMh6R3hwK0zD0b0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ytPINBkv5rvVprEGvB/DMT2PhcEpAXk9N65SfuVNYSU=; b=nJ2M1OwgDNJ6lRXzXJyIQD3d6KMeTlLtCPNLMpgydXFNU/JOGdpRs0AcgYGB8IRZ0S N+W1EqB125LW8qw8rLyKSQ3+k4kjhT9eJUcOrWniN9TQCp10mrvMQEzaqHt+kGtFckmH clSbku9G96kLePj6gKugHZIjYrVQpz4kQbix/PW1yvVvD4E/V6T5j9OesTLWy2F+6qvI hsna7oeW0fT51fujsix9eO0jdmtx34XiX5g8BQJPLA1BW0FWTsyX1MXTM/ZxZIPA4/ZD 0gRFlT15q5sPn9Fho4BgVHks3nOyFTks7PRY3zjS8Qy8eEdhfkQ7Yvca9xS4ptHgHLqq CpgQ== X-Gm-Message-State: AJIora9uT8vb8Qb4rAyphK0xZlDOBXtl69d6R9LqKT3MWgstR1i2M4TA FCL0LImBkqOyIzKCI15TRCv2pY241OPuBw== X-Google-Smtp-Source: AGRyM1tH5zJ3Qna0fMsa7Dy9KUDRO/peq1FhsQUNq99BTbeqiNCEi4bhkZYSjwevQVejqMhurfTTMg== X-Received: by 2002:a05:620a:4402:b0:6af:1b92:f064 with SMTP id v2-20020a05620a440200b006af1b92f064mr33430727qkp.410.1657221738293; Thu, 07 Jul 2022 12:22:18 -0700 (PDT) Received: from bill-the-cat.lan (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id de4-20020a05620a370400b006b253a6dd1fsm16033171qkb.125.2022.07.07.12.22.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 12:22:17 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: wd@denx.de Subject: [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling Date: Thu, 7 Jul 2022 15:22:15 -0400 Message-Id: <20220707192215.509444-2-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220707192215.509444-1-trini@konsulko.com> References: <20220707192215.509444-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Given the sometimes oddly formatted data that can come through when removing code, we need to be as flexible as possible when handling it. Set our encoding to unicode_escape and if we still run in to a problem, it's likely going to be OK to ignore it. Signed-off-by: Tom Rini --- I've emailed this to Jonathan Corbet as well as he's the upstream for the project, and this does work for me. But I'm not a python guru by any means. But trying to run the stats for v2022.04..v2022.07-rc6 blows up in places otherwise. logparser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/logparser.py b/logparser.py index efbc72f868eb..d5906e97689d 100644 --- a/logparser.py +++ b/logparser.py @@ -37,6 +37,7 @@ class LogPatchSplitter: self.fd = fd self.buffer = None self.patch = [] + sys.stdin.reconfigure(encoding='unicode_escape', errors='ignore') def __iter__(self): return self -- 2.25.1