Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 21263E00C7A; Fri, 7 Oct 2016 08:57:39 -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 * [147.11.1.11 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id BC1E1E00C7A for ; Fri, 7 Oct 2016 08:57:35 -0700 (PDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id u97FvZGc018882 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 7 Oct 2016 08:57:35 -0700 (PDT) Received: from yow-lhowlett-d0.wrs.com (128.224.56.217) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.294.0; Fri, 7 Oct 2016 08:57:34 -0700 From: "Liam R. Howlett" To: Date: Fri, 7 Oct 2016 11:57:20 -0400 Message-ID: <1475855841-30009-12-git-send-email-Liam.Howlett@WindRiver.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1475855841-30009-1-git-send-email-Liam.Howlett@WindRiver.com> References: <1475855841-30009-1-git-send-email-Liam.Howlett@WindRiver.com> MIME-Version: 1.0 Cc: paul.eggleton@linux.intel.com Subject: [layerindex-web][PATCH v2 11/12] recipeparse: remove unnecessary else statement. X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 15:57:39 -0000 Content-Type: text/plain Code clean up. Signed-off-by: Liam R. Howlett --- layerindex/recipeparse.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py index 91a083b..dd85bc3 100644 --- a/layerindex/recipeparse.py +++ b/layerindex/recipeparse.py @@ -134,15 +134,14 @@ def detect_file_type(path, subdir_start): if res: typename = 'machine' return (typename, None, res.group(1)) - else: - res = bbclass_re.match(subpath) - if res: - typename = 'bbclass' - return (typename, None, res.group(1)) - res = distro_conf_re.match(subpath) - if res: - typename = 'distro' - return (typename, None, res.group(1)) + res = bbclass_re.match(subpath) + if res: + typename = 'bbclass' + return (typename, None, res.group(1)) + res = distro_conf_re.match(subpath) + if res: + typename = 'distro' + return (typename, None, res.group(1)) if typename == 'recipe' or typename == 'bbappend': if subdir_start: -- 1.9.1