From patchwork Thu Jul 7 19:22:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1653798 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=ooLDmheq; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lf5s60pdDz9s07 for ; Fri, 8 Jul 2022 05:22:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8518A8456C; Thu, 7 Jul 2022 21:22:22 +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="ooLDmheq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6428E84577; Thu, 7 Jul 2022 21:22:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (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 D407184548 for ; Thu, 7 Jul 2022 21:22:18 +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-x72d.google.com with SMTP id o26so7054329qkl.6 for ; Thu, 07 Jul 2022 12:22:18 -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:mime-version :content-transfer-encoding; bh=p3YcRFWxCKfB7YETMrGXzF2unmR4nEqW9vAvFWi14oU=; b=ooLDmheq8rblvyPYsz0un7mR8pRAFcPYkb1cRXoc/Jq6nNTj2EsyE+cejWHSH4KzeD xpCBanVKWtZ9vDeo5Os6EzJCg3CgrCZnWSiKyivetWmUjKKpWj7zjFbBebT2ZCmr58jo Fe0uukv7f9DNrJt4EBDunWMC3+Q86taLSTAPI= 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:mime-version :content-transfer-encoding; bh=p3YcRFWxCKfB7YETMrGXzF2unmR4nEqW9vAvFWi14oU=; b=rbhNT2kcmDYY3U8KE7bdXM7TYMKqcrr7UphUuNTlXCPxKXg7STgUIsDsj/e7VcZtIi qjFUTURiuhmNLtBYJ27a+spQ5+lZW5eYNLImyaK94FnhhREsI1TjkPQG+a99fe8DbnTP KjlFo2t0bShNGt6HOgqkwArxEtlZTzkWXU9ZvOxqNkhpgGn7Td81/xcxkkC2PY+5Sfp1 3SdHL5zZ/q5OVx81FpRIXlln8MgZ+LQboa3z609puww5Jb1Hh0/BPqrYK6SOBolEncJP WPKCz8JcXNmN9kbn27pYLAO7fqT17bkxfFKB+BcHT3ZUoncgmehTmDa2DktakSGd77jc o10Q== X-Gm-Message-State: AJIora+koRzyyTJGHLQyZptaYHXfyK6qjv2unv3mv5oz+1G3/cmz7Kgz LHtVxYGAJekJW43bTSCbB8q/kKa30VqCfQ== X-Google-Smtp-Source: AGRyM1utwkUMC3Bdz2G2vxvQAR3SsG6LTPiOloLUXvgjhR2cmkO6UxdYDzVbBkB7Xd3DL5N0o1vUuA== X-Received: by 2002:a05:620a:240a:b0:6af:27bc:66dc with SMTP id d10-20020a05620a240a00b006af27bc66dcmr32525260qkn.92.1657221737244; Thu, 07 Jul 2022 12:22:17 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 12:22:16 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: wd@denx.de Subject: [gitdm PATCH 1/2] Merge branch 'master' into u-boot Date: Thu, 7 Jul 2022 15:22:14 -0400 Message-Id: <20220707192215.509444-1-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Bring us up to commit 0b8875225750 ("Allow multiple spaces within an email address") of the upstream gitdm project. Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- So this isn't a real patch exactly. This shows what the single merge error would need to be corrected as, in order to bring our tree up to the above commit from upstream. That in turn is just doing a python3 print() rather than python2 print in the error case where we try and further correct the Funky email addresses we have, in code that was already clearly marked as local only code. The rest of those changes moved in cleanly. +++ b/database.py @@@ -296,56 -315,20 +315,56 @@@ def AddEmailEmployerMapping(email, empl except KeyError: EmailToEmployer[email] = [(end, empl)] +##!!wd!! +FunkyToEmail = { + # + # Known corrupted addresses. + # + 'bnemec jcrosoft.com': 'plagnioj@jcrosoft.com', + 'plagnioj at': 'plagnioj@jcrosoft.com', + 'richardretanubun at ruggedcom.com': 'richardretanubun@ruggedcom.com', + 'scn1874 at yandex.ru': 'scn1874@yandex.ru', + 'stelian cisco com': 'kotnes@cisco.com', +##!!wd!! + - def MapToEmployer (email, unknown = 0): + def MapToEmployer(email, unknown = 0): # Somebody sometimes does s/@/ at /; let's fix it. - email = email.lower ().replace (' at ', '@') + email = email.lower().replace(' at ', '@') try: return EmailToEmployer[email] except KeyError: pass - namedom = email.split ('@') - if len (namedom) < 2: - print 'Oops...funky email %s' % email + namedom = email.split('@') + if len(namedom) < 2: + print('Oops...funky email %s' % email) + ##!!wd!! + try: + email = FunkyToEmail[email] - print ' ... fixed up to %s' % email ++ print(' ... fixed up to %s' % email) + namedom = email.split ('@') + except KeyError: + return [(nextyear, GetEmployer ('Funky'))] + ##!!wd!! - return [(nextyear, GetEmployer ('Funky'))] - s = namedom[1].split ('.') - for dots in range (len (s) - 2, -1, -1): - addr = '.'.join (s[dots:]) + return [(nextyear, GetEmployer('Funky'))] + s = namedom[1].split('.') + for dots in range(len(s) - 2, -1, -1): + addr = '.'.join(s[dots:]) try: return EmailToEmployer[addr] except KeyError: diff --cc database.py index f356f298c7ed,b50b70cac378..6c43dd23f55e --- a/database.py From patchwork Thu Jul 7 19:22:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1653799 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=WQVkScNT; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lf5sD6Xqtz9s07 for ; Fri, 8 Jul 2022 05:22:40 +1000 (AEST) 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 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 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 Reviewed-by: Simon Glass --- 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