Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3629032imm; Mon, 1 Oct 2018 01:39:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV62dipbVCw7mBPnLKbADKv5CjTa2JE+PdaGe+gmqnGsmugrKVlYBSULQJh6Hwe8ID3HWtA6K X-Received: by 2002:a63:7c1d:: with SMTP id x29-v6mr9249812pgc.273.1538383176090; Mon, 01 Oct 2018 01:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538383176; cv=none; d=google.com; s=arc-20160816; b=GGl38atqaJ/I27sjLrH0JKHObhCTwHiyKfqRC4nXO/d5aVxRjAJ5GyCTo3X6poa5QJ 2WgmQcXty2wCzcXwzmkIVC6/sREr5CUq6NoiTf76EnAReQ5LLEQb8PlfmdjE5Nb2M2r9 k3a2OmjWrM2vrbyIDQbsiQpVUhhvoHzpWyU8DPQlz1qqTrEQZJc0Mn9FBSoBT4OxyN6c tcLsodlYTHkSFNbcI5sQGy97l687hMn9Mh/v4GsXf1DhWwFJWEArxSb3aHsBktnqAg48 x1IHZ8PGGOYhj2yQpBHTD+GX81WQggdMfkP7QtGP6tg+6IdUlglqcSCFBGXDvOzhJ5Wu 2D2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=FUtAM4/PGlQ5AwZFr9TcZXJbLvGZLqWXiwgZBNGJ2T0=; b=bwK2W/W/NoUeI5r4WVC06boxqA4kY8JX/dNFxQhnJi09z8/RUgLHZaxw/z/jWXGayr 0w0gubBt/D372gaYCk03aaGWmX3sOdHUvFYkPssvV0Q7DccNraAZCVlwx4+w8LHFHtX/ 93DvYRO2GoLV41OUvq+Uh0bFVIiKtl2RHT6AVZIfWlI+EWqku+SPgv+EoAiE+eG8lFh3 pGx6sQ3mijlJC4UZTC0uwRtlTts8a+RIzs46GIafvb1oC09AnclLl+/42ROSYYYqbf2B eOiE75JOf5wFplC9DGmZJLox8BQxA+P5UySAkVUEAr3MmotreHHrYitMdfXF3kwOT5Y5 I4YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KJiAphgL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17-v6si5304220pgi.132.2018.10.01.01.39.21; Mon, 01 Oct 2018 01:39:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KJiAphgL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728873AbeJAPPt (ORCPT + 99 others); Mon, 1 Oct 2018 11:15:49 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34173 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbeJAPPt (ORCPT ); Mon, 1 Oct 2018 11:15:49 -0400 Received: by mail-pf1-f195.google.com with SMTP id k19-v6so8703915pfi.1 for ; Mon, 01 Oct 2018 01:39:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FUtAM4/PGlQ5AwZFr9TcZXJbLvGZLqWXiwgZBNGJ2T0=; b=KJiAphgL4EJFw4IGdZB2SC/SH0a1SlkUImsSv/G4iFs/G/Bjn+zVDpFbE96nPAbo3E JsBBpihuInBhXAWhgh+uS+7g3vxcWpNyoVjwZu13lcyrB5rbR6gOjYFG7V+avbxpnoQ1 uqKmb2CvTM1+Vt8s+JGfRkiRDbXR8sG1YWYUjG0VRISZy2OUyeysBBhgYCbvZM3isW9W 3aVVhOFL6EfQ986lY3TcK/bakiuUIplFJ4RB0cZLytUeRj7zG+f9soko+ZkeuoabKJC4 bT5o95Vg2okNUxUcnREnnZ+PP8yp6gTDmN5fatv1sUOPE95fObm/hcqDC2YhAVkfkRkY MEQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FUtAM4/PGlQ5AwZFr9TcZXJbLvGZLqWXiwgZBNGJ2T0=; b=uHslfK4WGH6rvjQewQV5l86z1QAP6a2liG8O00rsMCUy0EBIPKypesRBekvpfFu1Qg uK9Q+AoREQGx2ca59IJavj0bZYu9aKOHtdpiJEPqeW+PqBsPGwE19uNNhec1YA3EvOxM F6Hhruk93tIUsWJNnrvR33xeNpcdBPKj168vNOyggjITlv+olBVF20jYxrNkhjzKvvfQ DB/J1tsNP02VokCSt8g1gyGQgkbKDFq86TGvK9CbTEpLDQ7hkCjs2fzezsfuIK9HCmpc 91PPOr3oBWof76QYfw4OtgfhMpMz5Ucu1+4sKrGqWm2Y8KoSUcRmX3NmAmjypyE/WvwF e6dA== X-Gm-Message-State: ABuFfoj6Y4kHhKdKhMNoBA33H74uuYrHEiKmXPLu3ZnSrjvFEublv/ez fGh9VS6i164y6oW/G0YCvJogiSmOVs0= X-Received: by 2002:a17:902:d201:: with SMTP id t1-v6mr10627823ply.63.1538383151868; Mon, 01 Oct 2018 01:39:11 -0700 (PDT) Received: from Sherlock.localdomain ([14.139.38.159]) by smtp.gmail.com with ESMTPSA id u184-v6sm23562636pgd.27.2018.10.01.01.39.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 01:39:11 -0700 (PDT) From: Shubham Singh To: tglx@linutronix.de Cc: akpm@linux-foundation.org, jcline@redhat.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, shubhsherl Subject: [PATCH] scripts: spdxcheck: resovle decode warning for python3 Date: Mon, 1 Oct 2018 14:08:46 +0530 Message-Id: <20181001083846.9650-1-dhoni.singh094@gmail.com> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: shubhsherl Resolve a warning issue by spdxcheck in Python3 FAIL: 'str' object has no attribute 'decode' Signed-off-by: Shubham Singh --- scripts/spdxcheck.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py index 839e190bbd7a..6eea4073f28a 100755 --- a/scripts/spdxcheck.py +++ b/scripts/spdxcheck.py @@ -168,7 +168,8 @@ class id_parser(object): self.curline = 0 try: for line in fd: - line = line.decode(locale.getpreferredencoding(False), errors='ignore') + if type(line) != str: + line = line.decode(locale.getpreferredencoding(False), errors='ignore') self.curline += 1 if self.curline > maxlines: break -- 2.18.0