From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 59E501387FD for ; Thu, 11 Sep 2014 04:01:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D636E0A6A; Thu, 11 Sep 2014 04:01:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5A644E0A63 for ; Thu, 11 Sep 2014 04:01:17 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 34D313401D3 for ; Thu, 11 Sep 2014 04:01:16 +0000 (UTC) From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Subject: [gentoo-catalyst] [PATCH 4/6] reduce 2 operations into one simpler one Date: Wed, 10 Sep 2014 21:01:06 -0700 Message-Id: <1410408068-3441-5-git-send-email-dolsen@gentoo.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1410408068-3441-1-git-send-email-dolsen@gentoo.org> References: <1410408068-3441-1-git-send-email-dolsen@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Archives-Salt: 0c05a7a1-7a81-4be7-86d0-25bb63cd1b28 X-Archives-Hash: f3ac161b954815b42bf6371e86fe2094 --- catalyst/config.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/catalyst/config.py b/catalyst/config.py index 460bbd5..8b23342 100644 --- a/catalyst/config.py +++ b/catalyst/config.py @@ -54,11 +54,7 @@ class ParserBase: # Skip any blank lines if not myline: continue - # Look for separator - msearch = myline.find(self.key_value_separator) - - # If separator found assume its a new key - if msearch != -1: + if self.key_value_separator in myline: # Split on the first occurence of the separator creating two strings in the array mobjs mobjs = myline.split(self.key_value_separator, 1) mobjs[1] = mobjs[1].strip().strip('"') -- 2.1.0