public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Dolbec <dolsen@gentoo.org>
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	[thread overview]
Message-ID: <1410408068-3441-5-git-send-email-dolsen@gentoo.org> (raw)
In-Reply-To: <1410408068-3441-1-git-send-email-dolsen@gentoo.org>

---
 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



  parent reply	other threads:[~2014-09-11  4:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  4:01 [gentoo-catalyst] [PATCH 0/6] Various changes towards 3.0 branch Brian Dolbec
2014-09-11  4:01 ` [gentoo-catalyst] [PATCH 1/6] FIXME! Comment out a small code block causing TypeError Brian Dolbec
2014-09-11  4:01 ` [gentoo-catalyst] [PATCH 2/6] Break out more repeated (path1 + path2)'s Brian Dolbec
2014-09-11  4:01 ` [gentoo-catalyst] [PATCH 3/6] Rename a make.conf key to make_conf due to bash variable name restrictions Brian Dolbec
2014-09-11  4:01 ` Brian Dolbec [this message]
2014-09-11  4:01 ` [gentoo-catalyst] [PATCH 5/6] Extend ParserBase to do variable substitution Brian Dolbec
2014-09-11  4:01 ` [gentoo-catalyst] [PATCH 6/6] Make shdir a complete path to ease it's use Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410408068-3441-5-git-send-email-dolsen@gentoo.org \
    --to=dolsen@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox